Topic awaiting preservation: Simple .htaccess rewrite + me== stupid (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
posted 10-23-2003 08:18
Hi, |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 10-23-2003 11:10
well, the the mod_rewrite documentation will tell you all you need to know... |
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
posted 10-23-2003 21:01
Thanks, that seems perfect! |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 10-26-2003 00:33
Very well could be an infinite loop. Try adding [^?] before (.*) which means anything but a question mark. Normally a question mark means one or zero occurrences of something, but I think ? is just a plain character inside a character class [], so it should work just like that. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 10-26-2003 01:24
I think the [L] after the RewriteRule indicates "last", meaning no more rewrite rules should be processed; therefore, I don't think this would cause an infinite loop. |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 10-26-2003 02:11
Yep I think it is gtting stuck in an infinte loop - I've done this before myself many a time - you usually get a 500 error. What happens is that it keeps cycling through the same expression - the [L} appears to stop it moving on to the next one. So: |
Maniac (V) Inmate From: Seoul, Korea |
posted 10-26-2003 08:11
Just a note: that intermittent downtime you refer to? Well, it might be caused by you if you're throwing Apache into an infinite loop. The same thing happened to me the first time I tried to use .htaccess. I had at first thought it strange that the server kept going down just as I started testing things out, and then it dawned on me that perhaps I was the one causing it. Sure enough, there was an infinite loop that was using up resources until the server crashed. |
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
posted 10-27-2003 23:38
Actually, I did cause it. I crashed my entire webhost's systems for an hour or so. *shudders* |
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
posted 10-27-2003 23:51
I tried your solution, Emperor, but it crashed Apache again. |
Bipolar (III) Inmate From: The little green dot at the center of your monitor |
posted 10-27-2003 23:59
For which this seems to work, but does not hide it from the user: |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 10-28-2003 01:57
Hub-izer: I can't quite see why the question mark is there at all - is there a purpose to it? |
Maniac (V) Inmate From: Seoul, Korea |
posted 10-28-2003 02:11
Hub: Ah, I thought that might be the problem. |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 10-30-2003 00:31
I'm pretty sure the problem is that Rewrite Rule replaces a URL if the initial regexp matches at all. (ie. it still replaced the URL even if the regexp does not match the ENTIRE url but merely a portion of it). To get around that you can anchor the rule to the start of the URL. Try this: |