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

Why can users behind proxies not see my site?

If you have enabled hot link protection users behind proxies may not be able to see your site...

osCommerce password reset

How to reset your osCommerce admin login... You can reset your osCommerce administrative login...

Error 508 / 503 - Resource Limit Reached

To help maintain the stability of servers and keep websites fast, UltraWebHosting has resource...

Disable error_log via htaccess

Prevent public display of PHP errors via htaccess# supress php errorsphp_flag...

What is a virtual Domain?

A virtual domain is the base URL of the domain name. Examples include yourdomain.com, and...