2
我有两种类型的网址:.htaccess;重定向过多,如果在.htaccess两个不同的重定向
http://www.example.com/?content=contact_form.php
和
http://www.example.com/?content=product.php&id=20
我改变了我的整个系统的网址是这样的:
http://www.example.com/file/contact_form
and
http://www.example.com/product/I-m-the-title/20
当然,我做了301重定向.htaccess
告诉谷歌和co。新的网址。
我做了这样的:
# Rewrite URLs
RewriteEngine On
RewriteRule ^(ignore)($|/) - [L]
RewriteRule ^file/([^/]*)$ /?content=$1.php [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /?content=$1.php&title=$2&id=$3 [L]
# Redirect old URL to new URL
RewriteCond %{QUERY_STRING} ^content=contact\_form\.php$
RewriteCond %{REQUEST_URI} ^\/$
RewriteRule .* http://www.example.com/file/contact_form? [R=301,L]
RewriteCond %{QUERY_STRING} ^content=product\.php&class=I-m-the-title$
RewriteCond %{REQUEST_URI} ^\/$
RewriteRule .* http://www.example.com/I-m-the-title/Test/20? [R=301,L]
我的问题:
它完美工作:http://www.example.com/?content=product.php&id=20
但http://www.example.com/?content=contact_form.php
我得到它没能打开邮件因为重定向过多。
有人知道我在做什么错吗?我希望有人能够尽快帮助我,因为在Google误解它之前我必须解决它。
你太棒了。谢谢,非常感谢你! – David