.htaccess question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • donnie
    Confirmed User
    • Jan 2003
    • 1630

    #1

    .htaccess question

    I want to redirect traffic coming from certain URL?s and my .htaccess looks like this:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} domain1\.com/ [NC]
    RewriteRule ^$ http://domain2.com [L]

    It works and traffic coming from domain1 is redirected to domain2. But how do I add more domains I want to redirect from?
    I have tried adding one more line like this but that is not working:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} domain1\.com/ [NC]
    RewriteCond %{HTTP_REFERER} domain3\.com/ [NC]
    RewriteRule ^$ http://domain2.com [L]
  • cezam
    Confirmed User
    • Jun 2003
    • 1363

    #2
    Try

    RewriteCond %{HTTP_REFERER} domain1\.com [OR]
    RewriteCond %{HTTP_REFERER} domain3\.com
    RewriteRule...

    Comment

    • donnie
      Confirmed User
      • Jan 2003
      • 1630

      #3
      Originally posted by cezam
      Try

      RewriteCond %{HTTP_REFERER} domain1\.com [OR]
      RewriteCond %{HTTP_REFERER} domain3\.com
      RewriteRule...
      It's working Thank you so much!!

      Comment

      Working...