Page 1 of 1
reserved words for mod rewrite?
Posted: Thu Aug 17, 2006 8:37 am
by Skittlewidth
Code: Select all
RewriteRule ^news$ news.php [L]
RewriteRule ^developments$ developments.php [L]
I'm writing a very basic htaccess file along the lines of the above, so that we can publish urls as
http://www.blah.com/blah instead of
http://www.blah.com/blah.php .
They aren't all like that, some pages resolve to "page.php?id=2" but those two just need to resolve to the word plus .php
The "developments" rule works fine. But the "news" rule does not. If I change it to "newso" then it does, so it must be a specific problem with the word "news". Is it a reserved word? Or is there something about the letter combination that mod rewrite is interpreting in a different way??
Made several attempts to escape it but so far no joy. All the files are in the same directory.
Posted: Thu Aug 17, 2006 8:43 am
by JayBird
try taking the [L] off
Posted: Thu Aug 17, 2006 8:53 am
by Skittlewidth
nope, that didn't work. I wonder if its just specific to my current server environment and whether it would work on the live server. I'm not sure I can check that until next week though.
Posted: Thu Aug 17, 2006 8:58 am
by JayBird
Yeah, didnt think that would solve it, worth a try.
There are no reserved words as far as i know, and if there was, i doubt news would be one of them. Strange how it works with "newso" but not "news"
Posted: Thu Aug 17, 2006 9:24 am
by Skittlewidth
Looks like it works fine on one of the live servers. I'd better take a look at my apache set up later!