2010-01-21 10 views
0

htaccess 리디렉션을 사용하려고합니다. 사용자를 리디렉션하려고 할 때 page.html로 이동하지 않고 어떤 이유 때문에 page.htmlpage.htmlpage.htmlpage.html로 이동하려고 시도합니다. 그것을 반복합니다. 누군가 내가 잘못 가고있는 어떤 단서가 있습니까?Htaccess 리디렉션이 작동하지 않습니까?

여기 내 htaccess로 파일입니다

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* 

<Limit GET POST> 
order deny,allow 
deny from all 
allow from all 
</Limit> 
<Limit PUT DELETE> 
order deny,allow 
deny from all 
</Limit> 
AuthName 2enetwork.x10hosting.com 
Options All -Indexes 
ErrorDocument 401 /error/401.html 
ErrorDocument 403 /error/403.html 
ErrorDocument 404 /error/404.html 
ErrorDocument 500 /error/500.html 
Redirect/http://2enetwork.tk/under_construction.html 
#RewriteEngine On 
#RewriteRule ^(.*)$ ./under_construction.html [L] 

아, 그리고 또한, 그것은 나에게 403 오류 및 아래 그것이 말하는하고 또한 302 오류가 발견 된 것을을 줄 것이다. 내가 Redirect/http://2enetwork.tk/under_construction.html을 언급하면 ​​잘 동작합니다. 사이트에 아무런 문제가 없으며 잘 작동하지 않는 페이지를 볼 수 있습니다.

답변

0

좋아요, 왜 그런지 알아 냈습니다. 내가 앉아서 내 사이트를 리디렉션하려고 시도했을 때 전체 사이트를 uc.html (under_construction.html)로 리디렉션했고 uc.html은 나머지 사이트에 포함되어 있으므로 uc.html로 리디렉션하려고했습니다. 다시는 또 다시, 다시는 결코 끝나지 않는 반복에서. 그래서, 나의 새로운 질문은, 어떻게 이런 일이 일어나지 않도록하는 것입니까? 내 전체 사이트 마이너스 uc.html을 리디렉션 할 수있는 방법이 있습니까?

0

무언가가 "go there"보다 더 복잡한 것은 무엇이든 mod_rewrite이 필요합니다.

0

이 테스트되지 않았습니다,하지만 ...

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !under_construction\.html$ 
RewriteRule ^(.*)$ ./under_construction.html [L] 

이한다 RewriteCond 라인 * under_construction.html라는 이름의 파일을 제외한 모든 요청을 재 작성을 알려줍니다.

* Techinically, "under_construction.html"문자열로 끝나는 모든 파일.

관련 문제