【发布时间】:2014-02-03 22:36:17
【问题描述】:
如何修改此 htaccess 使其允许 www.domain.com 和 domain.com。现在,当我给 www.domain.com 时,它会将其更改为 domain.com
Options -Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]
RewriteRule ^$ website/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/website%{REQUEST_URI} -f
RewriteRule .* website/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* website/index.php?q=$0 [QSA]
抱歉,对htaccess了解不多
【问题讨论】:
标签: apache .htaccess mod-rewrite