.htaccess:此处不允许使用 RewriteEngine [英] .htaccess: RewriteEngine not allowed here

查看:38
本文介绍了.htaccess:此处不允许使用 RewriteEngine的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 .htaccess 上传到服务器并收到错误 500(内部服务器错误).

I uploaded the .htaccess to the server and received an Error 500 (Internal Server Error).

在错误日志中我有以下错误:

And in the error log I had the following error:

.../.htaccess:此处不允许使用 RewriteEngine

但是 mod_rewrite.so 已启用.

所以,我需要改变吗

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>

/etc/httpd/conf/httpd.conf 文件中?

或者可能是别的什么?.htaccess 文件应该没问题,因为它在我的本地主机上工作得很好.我只是不想搞砸任何事情.

Or could it be something else? The .htaccess file should be okay, because it works perfectly fine on my localhost. I just don't want to screw anything up.

这是我的 .htaccess 文件的一部分:

Here's part of my .htaccess file:

Options All -Indexes

Options +FollowSymLinks

RewriteEngine On

推荐答案

.htaccess 的最低配置:

minimum configuration for your .htaccess to work:

AllowOverride FileInfo Options

允许所有配置也能正常工作:

allowing all configuration will work as well:

AllowOverride All

这篇关于.htaccess:此处不允许使用 RewriteEngine的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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