13

I have this line in a .htaccess file

Options +SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI  Includes  IncludesNOEXEC  SymLinksIfOwnerMatch  Indexes -Indexes

I am getting the following error:

Either all Options must start with + or -, or no Option may.

How can I fix this and still do the samething?

Better yet what does this line do and is it even needed?

peterh
  • 4,953
  • 13
  • 30
  • 44
d0001
  • 329
  • 1
  • 3
  • 7
  • 3
    This line doesn't make any sense at all, it's the same stuff over and over again, and is contradicting itself (`Indexes -Indexes`). Read the docs to learn what the options mean and then write a new line that does what you need. The error message itself should be self-explanatory. Lastly, I guess this is Apache 2.4, not 2.2 as you tagged it? – Sven Nov 28 '14 at 01:39
  • I took over this server. Dont have much experience with this. – d0001 Nov 28 '14 at 01:44
  • Me neither. I'd try Googling the terms `htaccess options` to start. You could also Google the text of the error message you're getting. – I say Reinstate Monica Nov 28 '14 at 02:17

1 Answers1

23

The answer to your question is contained within the error message.

The right thing to do in this case would be to smack whoever wrote that line, and make a list of each option specified. If it appears with a minus at all, put it in once with a minus. If it appears only bare or with a plus, put it in once with a plus.

I believe you just want this:

Options +SymLinksIfOwnerMatch +ExecCGI +Includes +IncludesNOEXEC -Indexes

Why this particular option set is required in that area, I don't know. But, feel free to read the documentation for an explanation of each one, and see how or if your use case requires it.

Falcon Momot
  • 25,244
  • 15
  • 63
  • 92