You may be getting “500 Internal Server Error” upon requesting a uploaded images of a wordpress / php website running on IIS7+ / Windows Server. This same error can be noted as url rewrite error on some debugging tools (developer tools) like chrome inspector. Also the same error can be noted as 500.50.
Nature of the Problem:
This is a very simple problem resulting because of the insufficient permission to read the requested file using the user which is running the PHP service on the windows server machine.
For WordPress website
- Navigate to your WordPress site physical location
- Go to Wp-Content directory
- Right-Click uploads directory / folder and select ‘Properties’
- Go to ‘Security’ tab
- Click Edit
- Select ‘IUSR’ under group or user names
- Select ‘Read & Execute’ under permissions for IUSR
- Click ‘Apply’ and ‘Ok’
For Regular PHP websites
Follow the same procedures as the WordPress website. Note that the directory you need to give the permission to the ‘IUSR’ is the temporary directory specified in your ‘php.ini’ configuration file.