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

Error 406 unacceptable

This error can be caused by several factors. One cause can be the incorrect permissions are set...

My index page does not load - Why not?

Filenames are case sensitive. Be sure you have an index filename all in lower case. Examples are...

What are these vt directories?

Those are FrontPage extension directories. If you have and no longer need them you can uninstall...

How do I hide my domain WHOIS information?

If you do not wish to have your contact information shown when someone does a WHOIS report on...