2014-10-15 5 views
0
워드

퍼머의 변경 후에는 I /post.html 내지 퍼머 변경/I가 포스트의 .htaccess이 코드 사용/리디렉션 301 /post.html 발/포스트/

:

RedirectMatch 301 /(.*)\.html http://example.com/$1 

을 게시물이 잘 리디렉션되지만 홈페이지로 이동하면 http://example.com/index과 404 오류가 표시됩니다.

어떻게 수정할 수 있습니까?

답변

0

당신은 index 일치 피하기 위해 negative lookahead를 사용할 수 있습니다

RedirectMatch 301 ^/((?!index).+?)\.html$ http://example.com/$1