Windows server HTTP Error 500.50 – URL Rewrite Module Error while accessing the image

Hi All

We faced the problem while upload the image in windows server!

Image uploaded fine into server , but its not accessible from user-end through browser. Error displayed “500.50 – URL Rewrite Module Error

Reason:
The problem happens, when you use PHP to upload a file.  When you upload a file or image, PHP sends the file to a temporary directory on the hard drive (C:\Windows\Temp) and then copies it over to it’s intended directory(into site location).  Once the file has landed in the temporary directory, it is assigned the permissions of that directory. The problem is when Windows copies that file, it keeps the temporary directory’s permissions and doesn’t inherit your web directory’s permissions.

Solution:
1. Change the permissions on the temp folder(C:\Windows\Temp) giving IIS_IUSRS – write/modify. Find below image.

2. Change the path of the temp folder in the PHP.ini file to a folder that does have IIS_IUSRS write/modify permission.

windows temp folder permission change - 500.50 - URL Rewrite Module Error

Leave a Reply

Your email address will not be published. Required fields are marked *