0
가능한 중복 :
apache redirect from non www to wwwwww가 아닌 www .htaccess 리디렉션이 작동하지 않습니까?
내가 내 도메인은 www가 버전에 www가 아닌 리디렉션합니다. 어떤 이유로 아래 코드가 작동하지 않습니다.
제안 사항?
대부분의 쉬운 수정 프로그램이 있지만 작동시키지 못할 수 있습니다.
<ifmodule mod_deflate.c>
<filesmatch \.(css|html|js|php|xml)$>
setoutputfilter deflate
</filesmatch>
</ifmodule>
<ifmodule mod_security.c>
secfilterengine off
secfilterscanpost off
</ifmodule>
<ifmodule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^trailerpulse.com/
RewriteRule (.*) http://www.trailerpulse.com/$1 [R=301,L]
RewriteCond %{request_filename} -f
RewriteRule ^(.*) $1 [L]
RewriteRule ^([a-z]+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L]
</ifmodule>
<ifmodule mod_expires.c>
ExpiresActive On
ExpiresDefault A0
<filesmatch \.(css|js|gif|jpe?g|png)$>
ExpiresDefault A604800
</filesmatch>
<filesmatch \.(html|xml)$>
ExpiresDefault A10800
</filesmatch>
</ifmodule>
FileEtag None
Options All -Indexes
ServerSignature Off
ErrorDocument 404 /error
왜 당신이 그것을 위해 mod_rewrite를를 사용하는을? http://stackoverflow.com/questions/1100343/apache-redirect-from-non-www-to-www/1100363#1100363 –
사이트가 기반으로하는 스크립트를 구입했을 때 작성된 코드입니다. – Rhys
충분합니다. 링크 된 질문에서 언급 한대로'Redirect' 지시어를 사용하는 것이 좋습니다. 훨씬 간단합니다. –