【发布时间】:2013-08-22 06:29:27
【问题描述】:
假设我有这样的查询字符串参数的 URL:
/index.php?test=MYID
使用 mod_rewrite,我怎样才能将它们重定向到像这样的 SES URL?
/index.php?view=MYID
【问题讨论】:
标签: .htaccess parameters rewrite query-string url-parameters
假设我有这样的查询字符串参数的 URL:
/index.php?test=MYID
使用 mod_rewrite,我怎样才能将它们重定向到像这样的 SES URL?
/index.php?view=MYID
【问题讨论】:
标签: .htaccess parameters rewrite query-string url-parameters
试试:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^test=(.*)$
RewriteRule ^index\.php$ /index.php?view=%1 [L,R=301]
【讨论】: