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 I not ping my domain?

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

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

What is a virtual Domain?

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

I have a reseller account. What can I use for billing software and automation?

There are many great programs that work for both billing, domain and cpanel integration. Check...

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.