1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help with .htaccess - redirect only one kind of URLs

Discussion in 'Apache' started by postcd, Jan 28, 2014.

  1. #1
    Hello,

    this redirect redirects all subpages of a domain to another domain while not redirecting to index.php but to same page, only at another domain:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^cz\.hq-scenes\.com$ [NC]
    RewriteRule ^(.*)$ http://cz.hq-scenes.com/$1 [R=301,L]

    i want to achieve that only pages like /viewtopic.php...............

    will be redirected (............. means any other characters)

    Please how to redirect all viewtopic.php pages only? How to modiffy it?
     
    postcd, Jan 28, 2014 IP
  2. rapaman

    rapaman Active Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #2
    write example how you want redirect - source url to target url and I will write you example
     
    rapaman, Jan 28, 2014 IP
  3. rapaman

    rapaman Active Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    For start point
    RewriteRule ^/?viewtopic.php http://domain_com [R=301,L]
    Code (markup):
     
    rapaman, Jan 28, 2014 IP