我在 .htaccess 中有规则
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^item/(.*)/?$ item.php/$1 [L,NC]
RewriteRule ^([^\.]+)$ $1.php [L,NC]
重定向到 /item/page
我从商店中删除了一件商品,现在我需要将 /item/x 重定向到 /item/y
尝试过这种方式重定向,但没有成功
Redirect ^/item/x$ /item/y
Redirect https://testsite.org/item/x https://testsite.org/item/y
Redirect /item/x https://testsite.org/item/y
为什么你突然想使用与你实现先前规则的模块不同的模块?为什么不坚持你已经知道的规则并基于重写模块实现另一个规则?那么作为
RewriteRule
?