phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
mod_rewrite problem

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
::  
Author Message
neyne



Joined: 24 Nov 2007
Posts: 1

mod_rewrite problemPosted: Sat Nov 24, 2007 10:26 am    Post subject: mod_rewrite problem

Hi everyone,

I'm ahving a problem with a rewrite I want to do. Basically, I want to redirect traffic from a certain site to a specific page on my site. I won't see hwo this would be any different than redirecting to a customized homepage according to the user agent (except for the RewriteCond, but it doesn't work.

This is the code:

Code:
RewriteEngine on
#Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_REFERER} ^http://www.originating-site\.com [NC]
RewriteRule ^.*$ /target-page-on-my-site.html [R]
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3089

mod_rewrite problemPosted: Sat Nov 24, 2007 12:58 pm    Post subject: Re: mod_rewrite problem

What do you want to do more precisely ?
You say you want to redirect traffic from a site, thus from a domain?, but instead, you talk of user agent and in the end start trying with the HTTP_referrer. So it's a bit confusing.

If the domain you want to redirect from is yours, you'd better redirect from where it is installed than playing with HTTP_REFERER, because the referrer value can be empty or wrong, due to firewalls or user manipulation in the browser.
Doing it with the HTTP_REFERER implies you take car of the empty referrer case, something like :

Code:
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} ^http://www\.referaldomain\.com$ [NC]
ReWriteRule ^.*$ /target-page-on-my-site.html [L,R=301]

_________________
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: