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

Default Nameservers

If you have signed up for an Ultra 1x, Ultra Unlimited, or Ultra Unlimited Pro plan the following...

htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

To solve “.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable” follow...

403 Error on POST

This can occur for several reasons: Be sure your file permissions are correct. If the file needs...

vBulletin fsockopen() [function.fsockopen]: unable to connect

When setting up mail in vBulletin be sure you are using localhost for the mail server along with...

Domain Slamming - Beware

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