嗨,我想知道我应该在.htaccess中写些什么来执行以下操作。
我想要:
profile.php?profile=X9H6W6
重定向到:
/profile/X9H6W6/
不太确定如何执行此操作。
您可以在以下规则中使用此规则DocumentRoot/.htaccess
:
RewriteEngine On
RewriteRule ^profile/([^/]+)/?$ /profile.php?profile=$1 [L,QSA]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句