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 expert needed (https://gfy.com/showthread.php?t=76472)

HQ 09-10-2002 03:57 PM

.htaccess expert needed
 
.htaccess expert needed for an interesting problem. (and i know i already posted this in the webmaster forum, but this forum is so much more helpful.)

I'm getting an infinite loop happening in my .htaccess redirection. Is there anyway to 'turn off' the redirect when the html file being loaded *is* where the browser is being redirected to?

kevin197 09-10-2002 04:00 PM

post your code please

HQ 09-10-2002 04:07 PM

Here it is:

RewriteEngine On
RewriteCond %{HTTP_REFERER} .*substring.* [NC]
RewriteRule /* http://www.freegallery.biz/index2.html [R,L]

So whenever a referrer has "substring" in it, it forwards it to my entrance page, http://www.freegallery.biz/index2.html, instead of my main page, http://www.freegallery.biz/. The problem is that when index2.html is requested, the referrer still matches the substring and causes an infinite loop.

salsbury 09-10-2002 04:12 PM

RewriteCond %{REQUEST_URI} !^/index3.html

ought to do it, before the RewriteRule?

edited out the [NC] - it is unnecessary

HQ 09-10-2002 04:35 PM

Quote:

Originally posted by salsbury
RewriteCond %{REQUEST_URI} !^/index3.html

ought to do it, before the RewriteRule?

edited out the [NC] - it is unnecessary

I don't see how that will work. Where do I put in my substring comparison? And why is [NC] unnecessary?


All times are GMT -7. The time now is 05:33 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123