GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   .htaccess experts please read and help.. (https://gfy.com/showthread.php?t=54433)

jojojo 03-23-2002 05:01 AM

.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

Big E 03-23-2002 07:25 AM

In either .htaccess or httpd.conf:

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://www.somedomain.com/$
RewriteRule ^.*$ http://www.someotherdomain.com

jojojo 03-23-2002 07:33 AM

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

Big E 03-23-2002 08:32 PM

You can, but you've got to make sure that you've got 'Options AllowOveride' for that directory in the httpd.conf as well.

Muff 03-23-2002 08:43 PM

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