1
嗨,我想请教各位.htacess 301重定向:何使.htacess重定向,并保持完整的URL路径
我有例如路径许多动态网址是这样的:
http://www.domain.com/post1.html
http://www.domain.com/post2.html
和我需要将其重定向到相同的URL,但有一点不同的网域(不含WWW):
http://domain.com/post1.html
http://domain.com/post2.html
我已经这样做了:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com
RewriteRule (.*) http://domain.com/$1 [R=301,L]
重定向的作品,但我正常的网址变得网址的ID,如:
http://domain.com/index.php?id=931
不喜欢它应该是:
http://domain.com/post1.html
任何意见或直升机赞赏。 谢谢。
把所有.htaccess内容放在这里! – undone