I have a dynamically created .js file by PHP. For this to work I added the following to an Apache .htaccess file:
AddHandler application/x-httpd-php .js
AddType application/javascript .js
But the .js files are sent with the MIME type text/html
.
How can I make Apache still send it with MIME type application/javascript
? As I have a lot of .js files, adding the header by PHP is not an option.