.htaccess referral redirect

It is often useful to redirect a visitor to a page based on the referring website. There are innumerable reasons to do this and can be a wonderful way to create a personal experience for the visitor. 

Edit your .htaccess file and add the following:


RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www\.)?partnerwebsite\.com
RewriteRule ^$ /other_directory/specific_page.shtml [L]


  • 144 Users Found This Useful

Was this answer helpful?

Related Articles

I can not move out of the / directory. Why not?

For security reasons, you cannot move out of the root folder of your own domain.

Can I change my username?

Usernames are setup in the manner for security. Most programs will allow you to save the...

How can I make search engine friendly urls with my app?

The best source is the support forums for the particular app. You can also check the following...

Some visitors in China and Russia cannot reach my website.

Some networks known for abusive activity such as hacking in countries such as China, North Korea...

Why is the server load status red?

The server load status will be red if the server is under a little more stress than usual. This...