Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mod_headers not working

I enable mod_headers and mod_rewrite in my http.config removing the # from line.

LoadModule headers_module modules/mod_headers.so

LoadModule rewrite_module modules/mod_rewrite.so

I need enable more something or the error is on .htaccess?

.htaccess.

RewriteEngine On
RewriteRule ^(.*?)\.x$ /$1.php [L]
<IfModule mod_headers.c>   
   <filesMatch "\.(x)$">
        Header set foo "baa"
  </filesMatch>  
</IfModule> 

Thanks in advance!

like image 483
The Mask Avatar asked Aug 29 '11 03:08

The Mask


1 Answers

Try loading the headers module with

sudo a2enmod headers 
sudo service apache2 restart
like image 155
Miguel Gil Martínez Avatar answered Sep 28 '22 07:09

Miguel Gil Martínez