如何从重写URLlocalhost/folder/abc.php?p_id=1
来localhost/folder/xyx/1
。
我尝试了很多方法,但仍然无法重写URL。
RewriteEngine On
RewriteRule ^xyx/(.+)$ folder/abc.php?p_id=$1 [L]
您可以在内部使用此规则folder/.htaccess
:
RewriteEngine On
RewriteRule ^xyz/(.+\.(?:css|js))$ /folder/$1 [L,R=301,NE,NC]
RewriteRule ^xyz/(.+) abc.php?p_id=$1 [L,QSA,NC]
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句