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]



  • 146 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.

Your connection to this server has been blocked at the firewall

If you receive the message: "Your connection to this server has been blocked at the firewall. If...

Adding a Facebook Button

Facebook has a wonderful page on adding a Facebook image to your website complete with...

My site was hacked

This typically occurs when you are running a script/app on your website which is out-dated and...

How can I tell how much disk space I have available?

To see how much disk space you have available, go to your control panel and on the left side of...