I have used .htaccess to successfully mask urls with custom, clean urls in the style of subdirectories for the top level of a domain:
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
RewriteRule ^([^/]+)/([^/]+)$ /index.php?page=$1&subject=$2 [QSA]
RewriteRule ^([^/]+)$ /index.php?page=$1 [QSA]
gives me:
/page/subject
/page
Now, in using specific deployments for different PHP files, I would like to make subset directories for said deployments as in:
RewriteRule ^mobile/([^/]+)/([^/]+)$ /mobile.php?page=$1&subject=$2 [QSA]
RewriteRule ^mobile/([^/]+)$ /mobile.php?page=$1 [QSA,L]
to give me:
/mobile/page/subject
/mobile/page
I've tried changing [QSA,L] to [NC,L] and nothing. Any ideas? Any help is greatly appreciated! :) Thank you in advance.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.