doupian6118 2014-10-18 20:20
浏览 278
已采纳

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

My site url is http://localhost/Apps/index.php; it works fine without an .htaccess file, but when i add an .htaccess, I receive the following error:

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.

My .htaccess file code is

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?url=$1 [L, QSA]

PHP Error log:

[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

I am using a WAMP server. My file directory is: C:\wamp\www\Apps\index.php the Apps folder also contains a .htaccess file.

  • 写回答

1条回答 默认 最新

  • dongluan5740 2014-10-18 20:29
    关注

    Is the mod_reqrite activated? If not do so in your httpd.conf , by adding or modifying this: LoadModule rewrite_module modules/mod_rewrite.so Else check your logs and add them to your post.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 kali环境运行volatility分析android内存文件,缺profile
  • ¥15 写uniapp时遇到的问题
  • ¥15 vs 2008 安装遇到问题
  • ¥15 matlab有限元法求解梁带有若干弹簧质量系统的固有频率
  • ¥15 找一个网络防御专家,外包的
  • ¥100 能不能让两张不同的图片md5值一样,(有尝)
  • ¥15 informer代码训练自己的数据集,改参数怎么改
  • ¥15 请看一下,学校实验要求,我需要具体代码
  • ¥50 pc微信3.6.0.18不能登陆 有偿解决问题
  • ¥20 MATLAB绘制两隐函数曲面的交线