【问题标题】:htaccess redirection for query string查询字符串的htaccess重定向
【发布时间】:2013-05-24 07:08:01
【问题描述】:
【问题讨论】:
标签:
.htaccess
redirect
query-string
【解决方案1】:
请看下面的代码它会帮助你请试试这个
RewriteCond %{REQUEST_URI} ^/index.php$
RewriteCond %{QUERY_STRING} ^page=home$
RewriteRule ^(.*)$ http://www.manpowersupplyfromnepal.com/home? [R=301,L]
RewriteCond %{REQUEST_URI} ^/index.php$
RewriteCond %{QUERY_STRING} ^page=about-us$
RewriteRule ^(.*)$ http://www.manpowersupplyfromnepal.com/about-us? [R=301,L]
另类
RewriteCond %{REQUEST_URI} ^/index\.php$
RewriteCond %{QUERY_STRING} ^page=about-us$
RewriteRule ^(.*)$ http://www.manpowersupplyfromnepal.com/about-us? [R=301,L]
这将永久重定向 URL,并且您将获得所需的 URL 而无需查询字符串