【问题标题】:Internel Sever Error and .htaccess file内部服务器错误和 .htaccess 文件
【发布时间】:2012-08-24 05:59:47
【问题描述】:

我通过 tortoise-svn 将一个项目导入到我的 wamp 服务器的 www 文件夹中。

但我得到了

内部服务器错误

在 apache 错误日志中>

[2012 年 8 月 24 日星期五 11:04:45] [警报] [客户端 127.0.0.1] C:/wamp/www/Myproject/.htaccess:无效的命令“标题”,也许 由未包含在服务器中的模块拼写错误或定义 配置,referer:http://localhost/

这可能不会影响到:该项目使用zend,我在php.ini文件中设置include_path这样

include_path = ".;c:\php\includes;C:\wamp\www\ZendFramework-1.11.12\library\Zend"

但是那个项目已经在库文件夹中有zend。

【问题讨论】:

    标签: .htaccess zend-framework tortoisesvn


    【解决方案1】:

    确保在您的 apache 配置中取消注释:

    LoadModule headers_module modules/mod_headers.so
    

    Header 指令是 mod_headers 的一部分。如果没有加载该模块,它将引发错误。

    【讨论】:

    • thnkz,取消注释该行 bt 现在我明白了> Not Found 在此服务器上找不到请求的 URL /public/。
    • RewriteEngine On RewriteRule ^\.htaccess$ - [F] RewriteCond %{REQUEST_URI} ="" RewriteRule ^.*$ /public/index.php [NC,L] RewriteCond %{REQUEST_URI} ! ^/public/.*$ RewriteRule ^(.*)$ /public/$1 RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [NC,L] RewriteRule ^public/.*$ /public/index.php [ NC,L] 标头集 Cache-Control "max-age=290304000, public" AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
    • @Nash 您能否将其发布在您的原始问题中(并在每行前面添加 4 个空格,以便网站将其格式化为代码)?因为它在评论中是胡言乱语
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-03-26
    • 1970-01-01
    • 2010-10-07
    • 2014-12-14
    • 1970-01-01
    • 2023-03-05
    • 1970-01-01
    相关资源
    最近更新 更多