Forum Moderators: phranque
I want /page/somenumber to rewrite as /index?page=somenumber.
The line I have in the .htaccess is:
RewriteRule ^page/(0-9+) ./index.php?page=$1
But I'm getting a 404 error! It says /page/1 not found. What am I missing? I have other near-identical rules that all work, and I don't see what's so different. Any help?
This code is not for a 'redirect'. What you have there is a 'rewrite'. Is that what you want?
The [L] stands for Last rule. It stops processing here, and should always be included unless you know exactly why you need to omit it.
jdmorgan wrote a very good post about this in the last 24 hours in an earlier thread here.
AFAIK, "./" is not a option here. Try either no slash or a slash plus the full path from root. mod_rewrite in .htaccess cannot traverse above the Web root.
Jim