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

Can you write a script for me?

We do not write scripts but will be more than happy to guide you in the right direction. Most the...

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

Why do I have references to robots txt in my web stat programs?

Many search engines will look for a robots.txt file before spidering your sites content. The...

Why do I get emails for cron jobs?

This is the default. If you would like to disable receiving emails when a cron job runs append...

Setting up Zend Framework

When setting up Zend Frameworks in your hosting account be sure to upload your frameworks folder...