开发者

ignore last directory if it is the second directory mod_rewrite

开发者 https://www.devze.com 2023-01-31 06:58 出处:网络
I am attempting to setup a 开发者_如何学Pythonmod_rewrite that will do the following www.mysite.com/dir/ignoreMe

I am attempting to setup a 开发者_如何学Pythonmod_rewrite that will do the following

www.mysite.com/dir/ignoreMe
will map to
www.mysite.com/dir
however in the browser the url will still appear to be
www.mysite.com/dir/ignoreMe

if the url entered is simply
www.mysite.com/dir
the rewrite shouldn't do anything.

This way I can use the last/ second directory as if it was a GET query string


RewriteRule ^([^/]*)/([^/]+)$ /$1
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号