10

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?

Jorge
  • 5,610
  • 18
  • 47
  • 67

7 Answers7

4

Make sure you have AllowOverride Options privileges to use Options.

Gumbo
  • 643,351
  • 109
  • 780
  • 844
2

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

Options +FollowSymLinks
Camilla Horne
  • 91
  • 1
  • 7
  • I have a feeling from this answer that you simply removed the line that occurred in an error report without actually knowing what is it there for. While it might've fixed your issue it's not a good practice to advise it here. Your server probably just has this feature disabled, removing it can harm your redirections, so unless you put it there yourself batter contact your hosting provider -- and this is something you should describe in such an answer. – Jiří Sep 05 '22 at 12:25
2

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

Community
  • 1
  • 1
gimk
  • 21
  • 1
1

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>
Simonas B.
  • 191
  • 6
0

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

lwitzel
  • 591
  • 5
  • 15
0

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

Rohan Kumar
  • 40,431
  • 11
  • 76
  • 106
sendhil
  • 1
  • 1
0

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