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]



  • 144 Users Found This Useful

Was this answer helpful?

Related Articles

Do you have a firewall?

Yes, our servers have firewalls. For security we close off unused ports and update the server...

What are these htaccess files that keep popping up?

.htaccess files are default files the server uses to perform certain tasks. Features such as...

Setting up Zend Framework

When setting up Zend Frameworks in your hosting account be sure to upload your frameworks folder...

Error 404 - File Not Found

Files are case sensitive. Make sure you are typing the address in correctly. Verify that the...

Redirect http to https and www

To forward a website to use both www. and https:// use the following in an .htaccess file:...