如果我之后有shop
,我想隐藏bill
:
以下是我的示例网址:
http://mypools.myfiles.com/shop/bill/home.php
http://mypools.myfiles.com/shop/bill/search.php
http://mypools.myfiles.com/shop/bill/index.php
此外,如果我输入以下任何网址:
http://mypools.myfiles.com/shop/bill
http://mypools.myfiles.com/shop/bill/
我希望它重定向到以下链接:
http://mypools.myfiles.com/shop/bill/home.php
答案 0 :(得分:1)
将此代码放入DOCUMENT_ROOT/.htaccess
文件中:
RewriteEngine On
RewriteRule ^(bill/.+)$ /shop/$1 [L,NC]
RewriteRule ^shop/bill/?$ /shop/bill/home.php [L,NC]