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

I can not move out of the / directory, why not?

For security reasons, you cannot move out of the root folder of your own domain.

Why can I not ping my domain?

For security purposes we have closed off the ICMP port which is used for ping.

Show longer file names in directory/folder index

If you've ever wanted to show longer file names in your directory listing just create or edit an...

What are all these htaccess files?

.htaccess files are used to perform certain rules such as displaying a 404.shtml file in replace...

How can I turn off directory indexing?

In the directory that you wish you turn off directory indexing, you can do it under Index Manager...



Save 30% on web hosting - Use coupon code Hosting30