arik
arik

Reputation: 29250

.htaccess makes php files downloadable

I have an .htaccess file with following content:

AddHandler x-httpd-php5 .php

For some reason, whenever I upload it to the server, Firefox then wants to download PHP files instead of showing them, I think the Apache server has some error. What's wrong?

Thanks in advance ^^

Upvotes: 0

Views: 2708

Answers (2)

Stichoza
Stichoza

Reputation: 4609

Try AddType instead of AddHandler.

AddType application/x-httpd-php php

If it doesn't work, then just delete whole line. Deleting worked for me.

Upvotes: 0

maček
maček

Reputation: 77778

I think you want

AddHandler application/x-httpd-php5 .php

Upvotes: 1

Related Questions