0

我有一个目录/store,我想重定向www.example.comwww.example.com/store.. 而不/store在 url 中显示。

我也需要当我点击任何/store类似的产品时/store/product1.html,我需要去www.example.com/store/Product1.html而不显示/store在 URL 中。

我试过这个,它重定向到 /store 但它仍然在 url 上:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^store/
RewriteRule ^(.*)$ store/$1 [L]
4

1 回答 1

0
RewriteEngine on
RewriteBase /
RewriteRule !^store/ /store%{REQUEST_URI}
于 2013-07-16T10:55:52.267 回答