1
나는 .PHP 확장자를 제거하고 SEO 친화적 인 URL을 만들려면 다음 .htacess 파일이 있습니다에서 호스팅 할 때500 내부 오류 - 루프 재
이RewriteEngine On
ErrorDocument 404 /404.php
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^(.+)\.php$ /$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)$ index.php?page=$1 [L]
이 절대적으로 잘 작동을 우리의 도메인,하지만 우리 localhost 서버에서 로컬로 테스트 할 때 오류 500, 내부 서버 오류와 함께 제공됩니다. 내 httpd.conf 파일에서
는 재 작성 모듈은 주석입니다 :
LoadModule rewrite_module modules/mod_rewrite.so
아파치 오류 로그 상태 :
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://localhost:8888/Website/
어떤 아이디어?
도움을 주셔서 감사하지만 같은 문제가있는 것으로 보입니다. –
다른 규칙이나 다른 .htaccess도 있습니까? – anubhava
아니요, OP에 게시 된 htaccess 파일에 표시되는 내용은 .htaccess 파일에있는 내용입니다. 내 도메인에서는 작동하지만 localhost에서는 작동하지 않는 것은 이상하게 보입니다. –