如果'localhost / a / something'是网址,.htaccess会将其重写为'localhost / a / 1.php?food = something'
如果我输入'localhost / a / something something',它会给我404错误。
我现在的.htaccess:
RewriteEngine on
RewriteBase /a/
RewriteRule ^([A-z]+)$ 1.php?food=$1 [L]
我如何'localhost / a / something something'到'localhost / a / 1.php?food = something + something'?
答案 0 :(得分:1)
答案 1 :(得分:0)
在.htaccess中尝试此规则:
RewriteRule ^article/with\ 1.php$ /food/1.php [R=301,L]