2009-02-27 4 views
0

웹 사이트에서 얻은 오류를 리디렉션하는 .htaccess 파일을 만들고 싶습니다..htaccess 파일 의견 (하우투)

이전 사이트에서 모든 페이지를 삭제했습니다. 그러나 나는 사람들이 책을 쓴 페이지가 어떤 것인지 전혀 모른다.

새로운 웹 페이지와 웹 사이트 구조는 완전히 다릅니다 ... 이전 페이지와 동일한 페이지는 아니며 index.html에서 index.php로 변경된 색인 문서가 아닙니다.

그래서 여기가

은 당신이 무엇을 할 것인지, COMMENT 및 저에게 당신의 관점을 제공하기 위해 무료로 느끼는 ... 내가 서버에 업로드 한 htaccess로 파일입니다?

아마도 과잉입니다 ...하지만 작동합니다! 여기에 파일은 다음과 같습니다


#404 - Not Found The requested URL was not found on this server 
ErrorDocument 404 http://acecrodeo.com/new/01-acec.php?lang=fra 

#400 - Bad Request Your browser sent a request that this server could not understand 
ErrorDocument 400 http://acecrodeo.com/new/01-acec.php?lang=fra 

#401 - Authorization Required This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required. 
ErrorDocument 401 http://acecrodeo.com/new/01-acec.php?lang=fra 

#403 - Forbidden You don't have permission to access on this server 
ErrorDocument 403 http://acecrodeo.com/new/01-acec.php?lang=fra 

#405 - Method Not Allowed The requested method GET is not allowed for the URL 
ErrorDocument 405 http://acecrodeo.com/new/01-acec.php?lang=fra 

#406 Not Acceptable 
ErrorDocument 406 http://acecrodeo.com/new/01-acec.php?lang=fra 

#409 Conflict 
ErrorDocument 409 http://acecrodeo.com/new/01-acec.php?lang=fra 

##413 - Request Entity Too Large The requested resource does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit 
ErrorDocument 413 http://acecrodeo.com/new/01-acec.php?lang=fra 

#414 - Request-URI Too Large The requested URL's length exceeds the capacity limit for this server 
ErrorDocument 414 http://acecrodeo.com/new/01-acec.php?lang=fra 

##500 - Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request 
ErrorDocument 500 http://acecrodeo.com/new/01-acec.php?lang=fra 

#501 - Method Not Implemented GET to URL not supported 
ErrorDocument 501 http://acecrodeo.com/new/01-acec.php?lang=fra 

# ------------ i am not sure the usefullness of these.. put it anyway ! 

#301 - Moved Permanently The document has moved URL here 
ErrorDocument 301 http://acecrodeo.com/new/01-acec.php?lang=fra 

#302 - Found The document has moved URL here 
ErrorDocument 302 http://acecrodeo.com/new/01-acec.php?lang=fra 

#303 - See Other The answer to your request is located URL here 
ErrorDocument 302 http://acecrodeo.com/new/01-acec.php?lang=fra 

#304 - Not Modified A cached copy will be used 
ErrorDocument 304 http://acecrodeo.com/new/01-acec.php?lang=fra 

#408 - Request Time-out Server timeout waiting for the HTTP request from the client 
ErrorDocument 408 http://acecrodeo.com/new/01-acec.php?lang=fra 

#410 - Gone The requested resource is no longer available on this server and there is no forwarding address. Please remove all references to this resource 
ErrorDocument 410 http://acecrodeo.com/new/01-acec.php?lang=fra 

#411 - Length Required A request of the requested method GET requires a valid Content-length 
ErrorDocument 411 http://acecrodeo.com/new/01-acec.php?lang=fra 
어떤 PHP 요청에 대한

내가 aaa.php (이전 파일) 및 새 파일 요청 aaa.php LANG = ENG를 요청하는 경우

를? 오류가 발생했습니다 ... 어떻게해야합니까, 리디렉션합니까?

+0

그리고 귀하의 질문은 무엇입니까? – Gumbo

+0

무엇을 할 것인가? – menardmam

답변

0
당신은 절대 URL이 리디렉션 상태 코드에 원래 오류 상태 코드를 변경할 것을 알아야한다

:

참고 원격 URL을 가리키는 ErrorDocument을 지정할 때 (예 : 앞에 http와 같은 메소드가있는 경우) Apache는 문서가 동일한 서버에있는 경우에도 문서를 찾을 위치를 알려주기 위해 클라이언트로 리디렉션을 보냅니다. 여기에는 여러 가지 영향이 있습니다. 가장 중요한 점은 클라이언트가 원래의 오류 상태 코드를 수신하지 않고 대신 리디렉션 상태 코드를 수신한다는 것입니다. 이것은 차례로 상태 코드를 사용하여 URL이 유효한지 결정하려고하는 웹 로봇과 다른 클라이언트를 혼동시킬 수 있습니다. - 그래서 대신에없는 리소스에 대한 응답으로 404 Not Found를 보내는 ErrorDocument Directive

, 아파치는 아마 302 Temporary Redirect를 보내드립니다.


내가 할 수있는 것은 문서를 찾는 사람들에게 말하고 싶은 것을 말한 페이지로 오류를 로컬에서 처리하는 것입니다. 아마도 다음과 같은 것일 수 있습니다 :

이 웹 사이트는 example.com으로 옮겼습니다. 그러나 관리 시스템의 어리석은 변경으로 인해 이전 URI를 새 URI에 매핑 할 수 없습니다. 이 점에 대해 사과 드리며 찾고있는 페이지를 찾을 수 있기를 바랍니다.

검색 필드와 결합하면 사용자가 직면하고있는 상황에 대한 답변과 도움을 제공해야합니다.

+0

그래서 solutio는 무엇입니까? – menardmam

+0

어떤 문제/질문이 있습니까? – Gumbo

+0

그러면 "삭제"웹 페이지가 새 웹 페이지로 리다이렉트 되기만하면 404라는 메시지만으로도 충분합니다. ok .php? lang = eng는 무엇입니까? 내가 잊어 버린다면? lang = eng 나는 오류가있다. 404는 그것을 고칠 것인가? – menardmam

0

도움이 될만한 점은 사람들이 링크하기 때문에 리디렉션해야하는 페이지를 알고 싶다면 Google web master tools입니다. 그것은 당신에게 당신의 사이트에 페이지가있는 외부 링크의 전체 목록을 제공 할 것입니다. 일부 수동 리디렉션을 원할 경우 유용 할 수 있습니다.

0

Google Webmaster Tools을 사용하면 사람들이 북 메이킹을했을 수있는 페이지에 대한 아이디어를 얻을 수 있습니다. 무료이며 Google 애널리틱스와 달리 페이지에 스크립트 등을 추가 할 필요가 없습니다.

또한 나는 이것이 전혀 도움이되지 않는다는 것을 알고 있지만, cool URIs don't change입니다. 당신은 궤도에서 PageRank를 조준했습니다.