我正在尝试设置一个将执行以下操作的mod_rewrite
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.
这样我可以使用last / second目录,就好像它是一个GET查询字符串
答案 0 :(得分:0)
RewriteRule ^([^/]*)/([^/]+)$ /$1