0
SO 및 연구에서 도움을 받아 .htaccess
-Joomla 2.5 사이트의 파일을 만들 수있었습니다..htaccess해야 이상으로 다시 작성
불행히도 너무 많이 다시 쓰고 있으며 문제를 일으키는 표현을 찾을 수 없습니다.
은 문제 :site.com/administrator
, www.site.com
에 다시지고 있습니다. 첫 번째 규칙으로이 규칙을 추가
Options +FollowSymLinks
RewriteEngine On
## non-www to www
RewriteCond %{HTTP_HOST} ^site.com$ [NC]
RewriteRule ^(.*)$ http://www.site.com/$1 [R=301,L]
## old to new
RewriteRule ^index.php/hello$ /hello.html [L,R=301]
RewriteRule ^index.php/goodbye$ /goodbye.html [L,R=301]
RewriteRule ^this-is/an-old-link.html$ /this-is-now/a-newer-link.html [L,R=301]
RewriteRule ^galleries/docs/folder_web.pdf$ /printstuff/new-folder.html [L,R=301]
## old links with parameters
RewriteCond %{THE_REQUEST} \s/+(?:index\.php)?\?p=21(?:&|\s) [NC]
RewriteRule^/new-stuff/wow-sweetie.html? [L,R=301]
RewriteCond %{THE_REQUEST} \s/+(?:index\.php)?\?p=99(?:&|\s) [NC]
RewriteRule^/new-stuff/last-exit.html? [L,R=301]
## Begin - Rewrite rules to block out some common exploits.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F,L]
RewriteBase/
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
## sitemap
RewriteCond %{REQUEST_URI} ^/sitemap.xml
RewriteRule .* /index.php?option=com_xmap&view=xml&tmpl=component&id=1&format=html [L]
이 www''에'비 www'로 리디렉션됩니다 첫 번째 COND/규칙처럼 보인다. '[L]'플래그는 이것이 처리 된 마지막 규칙임을 의미합니다. – showdev