Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

web.config for rewrite

Status
Not open for further replies.

tyutghf

Technical User
Apr 12, 2008
258
GB
Our host has changed the server from using ISAPI to iis rewrites, so I need to transfer my .htaccess to a web.config.

I have done so via some tutorials I found on the web but am getting a 500 Internal server error when running with the web.config. Can someone see what I have done wrong?

Thanks

Code:
<configuration>
   <system.webServer>
        
		
<rewrite>
<rules>
	<rule name="Rewrite to places.asp">
      <match url="^/([0-9]+)/([_0-9a-z-]+)" />
      <action type="Rewrite" url="places.asp?county={R:1}&place={R:2}" />
    </rule>
	<rule name="Rewrite to directions.asp">
      <match url="^directions/([0-9]+)/([_0-9a-z-]+)" />
      <action type="Rewrite" url="directions.asp?county={R:1}&place={R:2}" />
    </rule>
	<rule name="Rewrite to tellafriend.asp">
      <match url="^tellafriend/([0-9]+)/([_0-9a-z-]+)" />
      <action type="Rewrite" url="tellafriend.asp?county={R:1}&place={R:2}" />
    </rule>
	<rule name="Rewrite to reviews.asp">
      <match url="^reviews/([0-9]+)/([_0-9a-z-]+)" />
      <action type="Rewrite" url="reviews.asp?county={R:1}&place={R:2}" />
    </rule>
</rules>
</rewrite>



   </system.webServer>
</configuration>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top