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

Mounting Samba Share in Linux for Startup

The following may be used to mount a samba share via your /etc/fstab file for bootup on...

My pages are updating/refreshing slowly

Refresh is immediate on the server. When a file is updated and uploaded it is there. If you are...

What is a Top-Level-Domain (TLD)?

TLD stands for Top Level Domain. This includes any domain names which suffix is .com, .net, .org,...

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

osCommerce password reset

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