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

How can I change the default page / document?

Create a .htaccess file, include the below information into it and upload it to the public_html...

Creating a Form Button

Sometimes all you need is a simple button. The following pages are pretty useful tools for...

Heartbleed Vulnerablity, Risk and Fix

The Heartbleed bug (http://en.wikipedia.org/wiki/Heartbleed_bug) is a serious vulnerability which...

What are all these htaccess files?

.htaccess files are used to perform certain rules such as displaying a 404.shtml file in replace...

I can not get the transfer authorization email can it be forwarded to a different email address?

The authorization has to be authorized by the registered contact for the domain. We cannot change...