如何将站点URL重定向到pligg中的www

时间:2010-12-18 06:31:56

标签: php

如何将网站网址重定向到pligg的www。我对pligg没有更多了解。所以请向我提供帮助。

example:http://example.com to http://www.example.com

谢谢

1 个答案:

答案 0 :(得分:1)

将您的网站基础设置为无www

的地址

编辑.htaccess

替换

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^\/?(.*)$ http://www.%{HTTP_HOST}/$1

# Fix trailing slash problem
RewriteRule ^([^\.]+[^/])$ http://infoneo.pl/$1/ [R=301,L]
# Remove www., always.
RewriteCond %{HTTP_HOST} ^www\.infoneo\.pl$ [NC]
RewriteRule ^(.*)$ http://infoneo.pl/$1 [R=301,L]
##### Re-directing End #####

infoneo.pl更改为您的站点基地

来自:http://discussion.dreamhost.com/thread-87381.html

相关问题