.htaccess “Options not allowed here”

前端 未结 9 1455
旧巷少年郎
旧巷少年郎 2021-01-01 12:07

I have this in my .htaccess:

Options +FollowSymLinks

And I get the following error in the apache error_log:

.htaccess: Options not allowed he         


        
9条回答
  •  爱一瞬间的悲伤
    2021-01-01 12:22

    I just installed the most recent version of XAMPP and thought to share how I solved the same problem.

    This is a XAMPP specific setting (with every new XAMPP install). The most recent up to date XAMPP as of today - XAMPP 1.8.3 have a setting in /xampp/apache/conf/extra/httpd-xampp.conf that's causing your "Server Error" message.

    And then you get the following error in your error log:

    .htaccess: Options not allowed here
    

    Open /xampp/apache/conf/extra/httpd-xampp.conf and find:

    
        
            
                php_admin_flag safe_mode off
            
        
        AllowOverride AuthConfig
    
    

    and change

    AllowOverride AuthConfig
    

    with

    AllowOverride All
    

    No authentication or authorization will be required after the change UNLESS you specify it in your httpd.conf, extra confs or in .htaccess.

    You may also want to read the Apache documentation for the option AllowOverride http://httpd.apache.org/docs/current/en/mod/core.html#allowoverride and choose more optimal and secure setting that will allow you to use your .htaccess without causing a server error.

    Also keep in mind that you can find a better place to rewrite the rule above depending on the results that you'd like to achieve. In my case this is a satisfactory change.

提交回复
热议问题