.htaccess 使用参数重写URL
我想重写此URL:.htaccess 使用参数重写URL,.htaccess,url-rewriting,.htaccess,Url Rewriting,我想重写此URL: https://example.com/forms/cus_F8fylX6aITpJOR 到 以下是我所尝试的: RewriteCond %{QUERY_STRING} id=(\w+) [NC] RewriteRule ^assets/forms/redirect.php?id=$1 [L] 我的错在哪里 谢谢您的帮助。这里是您需要的: Options +FollowSymLinks RewriteEngine On RewriteRule ^forms/([^/]+)
https://example.com/forms/cus_F8fylX6aITpJOR
到
以下是我所尝试的:
RewriteCond %{QUERY_STRING} id=(\w+) [NC]
RewriteRule ^assets/forms/redirect.php?id=$1 [L]
我的错在哪里
谢谢您的帮助。这里是您需要的:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^forms/([^/]+) /assets/forms/redirect.php?id=$1 [QSA,L]
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^forms/([^/]+) /assets/forms/redirect.php?id=$1 [QSA,L]