cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring and troubleshooting URL rewrite in IIS8

SOLVED

Configuring and troubleshooting URL rewrite in IIS8

Has anyone managed to get Magento 2 up and running on IIS8.

I have managed to complete the install wizard but see no graphics or css on the home page.

This according to the help files means the URL rewite may not be not working correctly.

Also I have no working admin page.

 

For the install I unticked the apache rewrite option, was this correct?

 

I have the following added to the web.config file and am trying to set it up on my LAN http://companyweb/magento/

Also the website has Windows Authentication Enabled

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
      		<rewrite> 
     		<rules>  
     		 <rule name="Imported Rule 1" stopProcessing="true">  
     		  <match url=".*" ignoreCase="false" />        
			<conditions>
                        <add input="{URL}" pattern="^/(media|skin|js)/" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />  
     		</conditions> 
		<action type="Rewrite" url="index.php" />  
   		  </rule>  
    		</rules>  
   	 </rewrite> 
    </system.webServer>
</configuration>

 

Any one point me in the right direction to troubleshoot this?

3 REPLIES

Re: Configuring and troubleshooting URL rewrite in IIS8

A little further forward now.

So it wasn't a url rewrite issue. It was an issue with the pub/static/frontend/ and pub/static/backend/ no being created during install. (not sure why this happened).

Running the following on the cli solved this problem.

 

magento setup:static-content:deploy

 

Admin was still not available but I think this was due to it being a top level domain.

So I re-deployed in a 2nd level domain

 

EDIT: Now the home page is fine and I can login to admin but I get no CSS or images on admin pages.

 

 

Any feed back would be great.

 

EDIT #2:  ran both the following cli commands and it is working

php magento setup:static-content:deploy
php magento setup:static-content:deploy en_GB

 

 

 

Re: Configuring and troubleshooting URL rewrite in IIS8

Thankyou! Worked for me.

 

 

php bin/magento setup:static-content:deploy

 

php bin/magento setup:static-content:deploy en_GB

 

 

Re: Configuring and troubleshooting URL rewrite in IIS8

it is not worked for me. i am using iis 7 and also installed URL rewrite.

how to fix it