开发者

htaccess Options +FollowSymLinks giving me 500 internal server error

开发者 https://www.devze.com 2023-02-25 18:25 出处:网络
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.

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_FILE开发者_运维问答NAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ index.php?page=$1 [L,QSA]

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


Make sure you have AllowOverride Options privileges to use Options.


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

Options +FollowSymLinks


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


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>


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.)


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消