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

问题描述

我上传的.htaccess到服务器,并获得了错误500(内部服务器错误)

和错误日志,我有以下错误:

... / htaccess的:RewriteEngine叙述此处不允许

mod_rewrite.so 已启用。

所以,我需要改变

 <目录/>
    有FollowSymLinks
    设置AllowOverride无
< /目录>
 

 <目录/>
    有FollowSymLinks
    设置AllowOverride所有
< /目录>
 

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

或可能是别的东西吗? .htaccess文件应该没问题,因为这工作完全正常在我的本地。我只是不想搞砸任何事了。

下面是我的.htaccess文件的一部分:

 选项全部-Indexes

选项​​+的FollowSymLinks

RewriteEngine叙述上
 

解决方案

为你的.htaccess工作的最低配置:

 的AllowOverride FileInfo的选项
 

让所有的配置将会工作:

 的AllowOverride所有
 

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 not allowed here

But mod_rewrite.so is enabled.

So, do I need to change

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

to

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

in the /etc/httpd/conf/httpd.conf file?

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.

Here's part of my .htaccess file:

Options All -Indexes

Options +FollowSymLinks

RewriteEngine On
解决方案

minimum configuration for your .htaccess to work:

AllowOverride FileInfo Options

allowing all configuration will work as well:

AllowOverride All

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

09-05 00:28