开发者

ignore last directory if it is the second directory mod_rewrite

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜