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 do I remove a web disk?

In Windows, go to My Network Places on your PC, find the connection, right click and delete....

Domain Slamming - Beware

There are several companies out there using a predatory practice of attempting to have you renew...

How do I parse html files as shtml?

Create an .htaccess file in the directory needed and add the following: AddHandler...

I have a reseller account. What can I use for billing software and automation?

There are many great programs that work for both billing, domain and cpanel integration. Check...

301 Redirect

This code will redirect all visitors who attempt to access the old-url.html page to the...