Another url rewrite question, apologies, but having a bit of trouble.
I have removed the .php extension from my files:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ $1.php
note: [app/ is set as the public directory]
note: [Apache server]
Goal
What I would like is to have URLs like such:
www.example.com/app/user/123 instead of www.example.com/app/user.php?id=123
I tried: RewriteRule ^user/([0-9]+)/?$ user.php?id=$1 [R=301,L,NC] but it just returns an 500 Internal Server Error
- Also will this affect
GETandPOSTrequests, or will thephpneed to be coded to reflect the url change?
Links I came across
right order of rewrite rules in an htaccess file
http://corz.org/serv/tricks/htaccess2.php
http://www.workingwith.me.uk/articles/scripting/mod_rewrite
.htaccess RewriteRule to preserve GET URL parameters
plus many others.
EDIT
Does the first rule of removing the.php affect the rules that come after it? i.e. stop them from processing