htaccess mod_rewrite在地址栏中省略目录名而不重定向

时间:2014-11-21 19:30:12

标签: .htaccess mod-rewrite redirect directory

我想在htaccess中使用mod_rewrite来省略浏览器地址栏中的文件夹名称,但它仍然在浏览器中从该位置生成内容,因此没有重定向。

例如,我想省略所有带有文件夹名称" _deploy"的URL。从地址栏中省略它。

所以这个:

http://www.myURL.com/_deploy/whatever.php#/whatever/whatever

对此的更改:

http://www.myURL.com/whatever.php#/whatever/whatever

它仍在加载http://www.myURL.com/_deploy/whatever.php#/whatever/whatever,但地址栏中显示的是http://www.myURL.com/whatever.php#/whatever/whatever。用户还可以导航到http://www.myURL.com/whatever.php#/whatever/whatever,并显示在地址栏中,但它确实正在加载http://www.myURL.com/_deploy/whatever.php#/whatever/whatever。这可能吗?

0 个答案:

没有答案