Answer the question
In order to leave comments, you need to log in
Mod_rewrite, unusual routing, how to make a proper redirect?
There is such a non-standard routing:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#project settings (1)
RewriteRule ^([A-Za-z0-9-]+)/editusers$ editusers.php?project=$1 [L,QSA]
#any project map (2)
RewriteRule ^([A-Za-z0-9-]+)/([^/]+)$ view.php?project=$1&map=$2 [L,QSA]
#any project, any map, edit
RewriteRule ^([A-Za-z0-9-]+)/([^/]+)/edit$ edit.php?project=$1&map=$2 [L,QSA]
#root rules
RewriteRule ^login$ auth.php?action=login [L,QSA]
#project info
RewriteRule ^([A-Za-z0-9-]+)$ info.php?project=$1 [L,QSA]
#any project map (2)
RewriteRule ^([A-Za-z0-9-]+)/([^/]+)$ view.php?project=$1&map=$2 [L,QSA]
#project settings (1)
RewriteRule ^([A-Za-z0-9-]+)/editusers$ editusers.php?project=$1 [L,QSA]
RewriteCond %{REQUEST_URI} !^/backend/
Answer the question
In order to leave comments, you need to log in
As a crutch, I had to make a temporary solution:
But I still have hope that someone knows the voodoo modrewright.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question