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

What perl modules are installed on the server?

You can get a complete list of the modules that are installed by going to the control panel and...

Redirect http to https and www

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

What are some tools are available to optimize my website?

There are many great tools to optimize your website. There is an optimize tool in your hosting...

I need a module installed but I do not have rights

No problem. Send us a trouble ticket and we will install the module as long as there are no...

How do I create a helpdesk ticket?

You may create a helpdesk ticket at any time by visiting https://my.ultrawebhosting.com and...