Jump to content

Htacces Filesmatch Help


lcdesign

Recommended Posts

Hey.

 

New to the forum, but this forum has always helped me out so I thought I would join up.

 

Rightio...I am about to add an image upload to my site. After reading some security blogs I have added the following to my htaccess file.

 

ForceType application/octet-stream
<FilesMatch "(?i)\.jpe?g$">
   ForceType image/jpeg
</FilesMatch>
<FilesMatch "(?i)\.gif$">
   ForceType image/gif
</FilesMatch>
<FilesMatch "(?i)\.png$">
   ForceType image/png
</FilesMatch>

 

When I browse to a PHP page it downloads the file.php instead of showing the page in the browser.

 

Any ideas would be much appreciated

 

Many thanks

Lewis

Link to comment
https://forums.phpfreaks.com/topic/268996-htacces-filesmatch-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.