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

Creating and Submitting a Google Sitemap

Creating a Google sitemap can be easy and beneficial. By using one, you are pushing a full list...

My index page does not load - Why not?

Filenames are case sensitive. Be sure you have an index filename all in lower case. Examples are...

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

htaccess - Allow Let's Encrypt to Validate and Renew

When receiving the following Let's Encrypt error message:domain.com: The SSL certificate expires...

Change your Websites Favorite Icon

How to change your website's icon for your internet browser. Create a 16x16 pixel icon image...