我想将一个url重写为静态查询:
example.com/register => example.com/login.php?page=register
我正在使用这个:
RewriteRule ^ register login.php?page = register [NC,L]
最佳答案 像这样使用它:
RewriteEngine On
RewriteRule ^(register)/?$/login.php?page=$1 [NC,L,QSA]
我想将一个url重写为静态查询:
example.com/register => example.com/login.php?page=register
我正在使用这个:
RewriteRule ^ register login.php?page = register [NC,L]
最佳答案 像这样使用它:
RewriteEngine On
RewriteRule ^(register)/?$/login.php?page=$1 [NC,L,QSA]