Мой сайт url is http://localhost/Apps/index.php
; она отлично работает без .htaccess
файла, но когда я добавить .htaccess
, я получаю следующее сообщение об ошибке:.htaccess файл вызывает внутреннюю ошибку сервера
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Мой .htaccess
код файла является
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [L, QSA]
PHP Журнал ошибок:
[18-Oct-2014 10:32:34 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found. in Unknown on line 0
Apache error.log:
[Sat Oct 18 06:51:11.609106 2014] [core:alert] [pid 3068:tid 960] [client ::1:3539] C:/wamp/www/Apps/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Я использую сервер WAMP. Мой каталог файлов: C: \ wamp \ www \ Apps \ index.php папка Apps также содержит файл .htaccess.
Проверьте свои журналы ошибок сервера, чтобы узнать, что происходит. – JimL
Я не уверен в моем коде. это мой первый код. когда я удаляю файл .htaccess, мой сайт работает нормально. –