lcdesign Posted October 2, 2012 Share Posted October 2, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/268996-htacces-filesmatch-help/ Share on other sites More sharing options...
lcdesign Posted October 2, 2012 Author Share Posted October 2, 2012 I forgot to mention that I am using MAMP on the mac to test the site locally. Not sure if this would cause problems or not... Quote Link to comment https://forums.phpfreaks.com/topic/268996-htacces-filesmatch-help/#findComment-1382216 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.