sombody可以帮我这个问题,我尝试使用htaccess文件重新直接一个页面,但它一直到新网址的末尾添加?c=oldpage
,例如:htaccess的添加查询字符串301重定向
http://www.mydomain.co.uk/newpage.html?c=oldpage
我已经尝试了一些张贴在这里的解决方案,但没有运气的,这里是我的.htaccess
文件:
DirectoryIndex index.php index.html index.htm
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{QUERY_STRING} PHPSESSID=.*$
RewriteRule (.*) http://www.mydomain.co.uk/$1? [R=301,L]
RewriteCond %{HTTP_HOST} ^mydomain.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.co.uk/$1 [R=301,L]
RewriteCond %{THE_REQUEST} /index\.php\ HTTP/
RewriteRule ^index\.php$/[R=301,L]
RewriteEngine on
RewriteRule ^product/(.*).html$ product.php?p=$1 [L]
RewriteRule ^(.*)\.html$ category.php?c=$1 [L,NC]
Redirect 301 /oldpage.html http://www.mydomain.co.uk/newpage.html
ErrorDocument 404 /404.php
感谢您的帮助。
感谢您的回复,没有任何这方面的运气IM - 我咬了我的深度 – Chris