Apache Header edit Location not working

apache-2.4

I'm trying to edit the Location header for responses but I can't get it to work – other headers are editable though

# This works
Header always edit Content-Type test TEST

# This doesn't work
Header always edit Location test TEST

The Location header is being set by a .htaccess file that I can't edit.
At the moment I have the code in the main apache.conf but I could move it into a vhost if necessary.

What can I do to make this work?

Best Answer

Can you live with the .htaccess being ignored completely? Then you could set the AccessFileName to something else.

https://httpd.apache.org/docs/2.4/howto/htaccess.html

I find it quite strange that you are the server admin but do not have the chance to edit the .htaccess though.

Related Topic