繁体   English   中英

.htaccess文件导致内部服务器错误

[英].htaccess file causes internal server error

我的网站网址是http://localhost/Apps/index.php ; 它工作正常,没有.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 admin@example.com 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文件。

是否激活了mod_reqrite 如果不是这样,请在您的httpd.conf中通过添加或修改以下内容进行操作: LoadModule rewrite_module modules/mod_rewrite.so否则,请检查您的日志并将其添加到您的帖子中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM