Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
785 views
in Technique[技术] by (71.8m points)

mod rewrite - .htaccess: RewriteEngine not allowed here

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
question from:https://stackoverflow.com/questions/6995545/htaccess-rewriteengine-not-allowed-here

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

minimum configuration for your .htaccess to work:

AllowOverride FileInfo Options

allowing all configuration will work as well:

AllowOverride All

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...