![]() |
.htaccess experts please read and help..
Is it possible to detect the referring domain and re-direct the surfer somewhere else using .htaccess?
javascript won't let me redirect and also just ignore the redirects if it comes from somewhere it's supposed to - it wants to send them to ANOTHER page... I just want to send surfers who click on a link to my site from a certain domain to be redirected somwhere otherwise the page would load fine... how do yo do this without impacting the site itself? I am hoping .htaccess I know it can be done using php but I have no idea how php works etc. - I need a more simplier solution :p thx |
In either .htaccess or httpd.conf:
RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://www.somedomain.com/$ RewriteRule ^.*$ http://www.someotherdomain.com |
thanks big E,
can you stick this file in a certain folder and have it effect just that folder? and do you just repeat the line to add multiple domains to redirect from? thanks |
You can, but you've got to make sure that you've got 'Options AllowOveride' for that directory in the httpd.conf as well.
|
migth want to add one more line to that incase traffic is sent without the www.
not sure if it makes a difference or not. RewriteCond %{HTTP_REFERER} ^http://somedomain.com/$ |
| All times are GMT -7. The time now is 09:46 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123