2012-06-26 3 views
0

임 다음 htaccess로와 서버에서 작업 정적 페이지로드 : 구성 htaccess로는

RewriteEngine On 
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule .* index.php 
RewriteRule ^[^/]*\.html$ index.php 
RewriteRule ^/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ - [L] 
RewriteRule ^/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/.*$ - [L] 

지금 그들의 서버 내부 정적 페이지를 준비하는 나에게 물었다을, 문제는 http://www.myserver.com/mystaticpage.html

를 호출 할 수 있습니다 해당 URL에 액세스하려고하면 index.php로 리디렉션됩니다. htacces 파일을 어떻게 변경하여 설치 한 CMS를 망칠 필요없이이 문제를 해결할 수 있습니까?

답변

1

이 시도 :

RewriteEngine On 
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteCond ${REQUEST_URI} !^/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php) 
RewriteRule .* index.php 
  • 를 이전에 사용 된 규칙이 중복되었습니다 : .* 다음을 index.php 재 작성되는 경우 이유 또한에 ^[^/]*\.html$ index.php을 다시? 이미 이전 규칙과 일치했습니다 ...
  • 세 개의 RewriteCond 조건이 첫 번째 규칙에만 적용되었으므로이 둘 또한 겹칩니다. 따라서 두 번째 규칙은 디스크의 정적 파일에도 적용됩니다.
  • 마지막으로 나열된 두 규칙은 아무런 영향을 미치지 않았습니다. 먼저 목록에 올리거나 전혀 표시하지 않아도됩니다. 나는 그들이 특정 uris에 다시 쓰는 것을 피하기 위하여 시도 되었기 때문에 추가 RewriteCond로 개조했다