어디에서나 온라인으로 보이는 htaccess 자습서는 모두 매우 기본입니다. 그들 중 누구도htaccess turorials를 얻을 수있는 곳
RewriteCond %{HTTP_HOST} ^www\.mysite\.com$ [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L]
[NC]
및 [R=301,L]
평균은 %{HTTP_HOST}
토큰에 왔는가 또한
(I은 301 REDIR의 상점을 파악할 수) 어떻게 설명하지? 다른 사람들은 무엇입니까? $1
은 언제 촬영 되었습니까? ...
이 모든 것을 설명하는 자습서가 있습니까?
편집 :
Options -Indexes
ErrorDocument 404 /404.php
CheckSpelling on
RewriteEngine On
RewriteBase/
###### Check for alias module to be installed ######
###### Domain without www ######
RewriteCond %{HTTP_HOST} ^www\.mysite\.com$ [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L]
###### End www rewrite section ######
# Remove multiple slashes anywhere in URL
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
# Remove multiple slashes after domain
RewriteCond %{HTTP_HOST} !=""
RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.*)\sHTTP/[0-9.]+$
RewriteRule .* http://%{HTTP_HOST}/%1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]
# show mysite.com/index.php always as mysite.com/
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://mysite.com/ [R=301,L]
이 www.mysite.com/index.php/////index.php
그들에 [L]
스위치
자습서는 참조가 아닙니다. http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html –