11

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?

closed as off-topic by Sven, HBruijn, Andrew Schulman, mdpc, Ward - Reinstate Monica Nov 29 '14 at 7:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 1:39
  • I took over this server. Dont have much experience with this. – d0001 Nov 28 '14 at 1: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 2:17
20

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.