错误500与编辑的.htaccess mod_rewrite的,但被加载 [英] Error 500 with .htaccess edits but mod_rewrite is loaded

查看:160
本文介绍了错误500与编辑的.htaccess mod_rewrite的,但被加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为标题,我与我的.htaccess文件的问题,一切都应该被设定罚款,但我写的东西基本为

as of title, I'm having problems with my .htaccess file, everything should be set fine, but has I write something as basic as

RewriteEngine on

它开始给我,那该多好500内部服务器错误。我托管在localhost Apache服务器上(UNIX)

it starts giving me that nice 500 Internal Server Error. I'm hosting on localhost on an Apache server (UNIX)

很显然,我三重检查一切设置好,和所有的mod_rewrite的顶部加载。

Obviously I triple checked that everything is set fine, and top of all that mod_rewrite is loaded.

感谢您的precious帮助!

Thanks for your precious help!

推荐答案

如果对发生错误的每一个的指令可以将文件中(即缓存, FilesMatch ,的ErrorDocument ,等等),还有,我能想到的,现在两个可能的选择:

If the error occurs for every single type of instruction you put in the file (that is, caching, FilesMatch, ErrorDocument, etc), there are two possible options that I can think of right now:


  1. 的.htaccess 文件的编码是不是与您正在运行的服务器兼容。尝试将其转换为ANSI,然后再次尝试(Apache不支持字节顺序标记,所以你需要将其保存为ANSI或UTF-8,无BOM)。如果不工作:

  1. The encoding of your .htaccess file is not compatible with the server you're running. Try converting it to ANSI, and then try again (Apache does not support Byte Order Marks, so you'd need to save it to ANSI, or UTF-8, without the BOM). If that does not work:

的AllowOverride 设置不正确,或根本没有。如果你有机会到虚拟主机/ Directory配置,则需要通过增加线路,以使其的AllowOverride全部<目录> 容器中。

AllowOverride is not set correctly, or not at all. If you have access to the Virtual Host/Directory configuration, you'll need to enable it by adding the line AllowOverride All in the <Directory> container.

这篇关于错误500与编辑的.htaccess mod_rewrite的,但被加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆