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

Sub-Domain times out

When you add a sub-domain and it times out make sure you do not have redirection set from that...

Common Search Engine Optimization Tips

Get other websites to link to you. Have your website linked and posted in socal media...

How can I change the default page / document?

Create a .htaccess file, include the below information into it and upload it to the public_html...

Why can I not ping my domain?

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

When I upload an htaccess file it disappears

On unix/linux systems, files that start with a . are considered hidden so many ftp programs do...