htaccess Options +FollowSymLinks giving me 500 internal server error

喜欢而已 提交于 2019-12-18 05:48:06

问题


This htaccess was working, then i just open it and then close. when i refresh my browser. it's 500 internal server error. I'm sure that my mod_rewrite is on.

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ index.php?page=$1 [L,QSA]

Did i do something wrong here? or any suggestions or comments?


回答1:


Make sure you have AllowOverride Options privileges to use Options.




回答2:


I had same problem and fixed it by removing this line:

Options +FollowSymLinks



回答3:


It appears that if the options directive was configured then it's necessary to set up the directory directive too.
This implies access to the Apache configuration files.
If this is not the case, we can simply comment the line "Options +FollowSymLinks", considering that this directive is by default "Options All" as states the Apache documentation.

Options Directive

Description: Configures what features are available in a particular directory

Syntax: Options [+|-]option [[+|-]option] ...

Default: Options All

Context: server config, virtual host, directory, .htaccess

...

The Options directive controls which server features are available in a particular directory.

Source: http://httpd.apache.org/docs/2.2/mod/core.html#options




回答4:


I don't think this is good practice, but it worked for me after i made AllowOverride rule to All, not sure why, but since I needed it only for testing locally it was OK...

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



回答5:


For me, this was in the directives for the site that was affected:

AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch

I simply added "FollowSymLinks" to the list, and the 500 error went away.

(Spent an hour trying to diagnose the problem, and this StackOverflow question gave me enough clues to solve it. Adding my solution here in case it can help someone else.)




回答6:


In my application there were 75+ application rules,using "

<LocationMatch "/ffservices/">
  Order Allow,Deny
  Allow from all
  SetHandler weblogic-handler
  WebLogicHost <<Hostname>>
  WebLogicPort    <<Portno>>
  Debug ALL
  DebugConfigInfo ON
</LocationMatch>

<LocationMatch "/travel/services/stage/">
  Order Allow,Deny
  Allow from all
  ProxyPass <<URL>>
  ProxyPassReverse <<URL>> (/travel/services/stage/)
</LocationMatch>

Thanks & Regards, Sendhil




回答7:


Are you using one.com? Then you have to edit htaccess Try with +Options FollowSymLinks



来源:https://stackoverflow.com/questions/5646818/htaccess-options-followsymlinks-giving-me-500-internal-server-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!