-3

shop如果在那之后我想隐藏bill

这些是我的示例 URL:

http://mypools.myfiles.com/shop/bill/home.php
http://mypools.myfiles.com/shop/bill/search.php
http://mypools.myfiles.com/shop/bill/index.php

此外,如果我键入以下任何 URL:

http://mypools.myfiles.com/shop/bill
http://mypools.myfiles.com/shop/bill/

我希望它重定向到以下链接:

http://mypools.myfiles.com/shop/bill/home.php
4

1 回答 1

1

将此代码放入您的DOCUMENT_ROOT/.htaccess文件中:

RewriteEngine On

RewriteRule ^(bill/.+)$ /shop/$1 [L,NC]

RewriteRule ^shop/bill/?$ /shop/bill/home.php [L,NC]
于 2014-06-21T18:07:20.590 回答