I am using following RewriteRules :
RewriteRule ^([a-zA-Z0-9]+)$ page.php?p=$1
RewriteRule ^e/([a-zA-Z0-9]+)$ edit.php?p=$1
The first one works fine : when typing mysite.com/id it loads mysite.com/page.php?p=id on server side.
The second one is working as well : when I type mysite.com/e/id it loads mysite.com/edit.php?p=id (as expected). But in that case edit.php can't loacte any external files like my css file.
<link rel="stylesheet" type="text/css" href="style.css" />
When doing either :
<link rel="stylesheet" type="text/css" href="../style.css" />
Or simply removing the direcory in the RewriteRule like :
RewriteRule ^e_([a-zA-Z0-9]+)$ edit.php?p=$1
it fixes that problem.
Now I don't understand why my edit.php is unable to locate external files even thought it loads on the correct path on server-side (mysite.com/) and not like the url displays in an extra directory (in this case mysite.com/e/ ).