1

I wanted to set the P3P Headers by adding them to .htaccess using the following:

<IfModule mod_headers.c>
Header set P3P "CP="ALL DSP COR CUR ADM TAI OUR IND COM NAV INT""
</IfModule>

However, this causes an Internal Server Error. The only related entry in the server log I can find is .htaccess : Header has too many arguments

As far as I can tell, mod_headers.c loaded.

Any idea on how to fix this? Thanks!

AnuragBabaresco
  • 604
  • 7
  • 19
  • Look in the error log to see what the exact error is. Perhaps it's the double double quotes? – Pekka Dec 06 '13 at 15:49
  • Should that *as* be a *has*? – TRiG Dec 06 '13 at 15:51
  • I am looking at the Apache error_log in Console (the server runs on OSX), but there is no specific error number, just a generic note. Let me see if I there is another log with more specific information. I tried removing the double quotes, but that did make a difference. I got the original implementation from here: http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html – AnuragBabaresco Dec 06 '13 at 16:12
  • I looked, but could not find any other logs that had more detailed information about the error. – AnuragBabaresco Dec 06 '13 at 19:04

1 Answers1

5

This line:

Header set P3P "CP="ALL DSP COR CUR ADM TAI OUR IND COM NAV INT""

Should be written as:

Header set P3P "CP=\"ALL DSP COR CUR ADM TAI OUR IND COM NAV INT\""
Aron Rotteveel
  • 73,917
  • 17
  • 100
  • 128
williamtroup
  • 11,291
  • 19
  • 64
  • 94