아래 주어진 htaccess로 코드는 내부 오류를500 내부 서버 오류 htaccess로
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^([w]{3,3}[.]{1,1}){0,1}example.com$
RewriteCond %{HTTP_HOST} ^([0-9a-zA-Z-]*)[.]example.com$
RewriteRule ^$ portfolio/index.php?id=%1 [NC,L]
AuthType Basic
AuthName "If your not authenticated , then go seat in corner"
AuthUserFile /var/www/devRoot/.htpasswd
Require valid-user
를 가져 오는 있습니다하지만 난 위의 코드에만
AuthType Basic
AuthName "If your not authenticated , then go seat in corner"
AuthUserFile /var/www/devRoot/.htpasswd
Require valid-user
완벽하게 작동하고 사용하고있는 경우.
문제 제 1 코드가 작동하지 않는 이유를 이해할 수 없습니다.
로그 :
[Wed Jul 10 13:12:11 2013] [alert] [client 1.23.112.242] /var/www/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configur ation
[Wed Jul 10 13:12:12 2013] [alert] [client 1.23.112.242] /var/www/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configur ation
해결 :
Did you ensure the RewriteEngine is on?
You'll want to verify that the mod is enabled - just look for rewrite.load symlink in /etc/apache2/mods-enabled. If not, run sudo a2enmod rewrite to enable it. Restart apache using sudo service apache2 restart and provided your .htaccess syntax is correct this will work.
Otherwise you will need to paste more information about your .htaccess file.
시작을 찾고. 그런 다음 대신 superuser.com을 고려해보십시오. –
디버깅을 켜는 방법 – user2568637