Hello I want to redirect all the requests to url example.com/rock/apps to example.com/rock/apps/webroot using Apache rewrite rules but the main thing is I do not want webroot come in to my url
Right now I have written this
RewriteEngine On
RewriteCond %{REQUEST_FI开发者_如何学JAVALENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ webroot [NC,L]
Which provides example.com/rock/apps/webroot
How to eliminate that webroot from the end ?
You can probably use mod_alias in conjunction with the rewrite. Instead of webroot use some other dummy path and alias that dummy path to webroot.
your conditions...
RewriteRule ^(rock/apps)/webroot$ $1
精彩评论