Results 1 to 2 of 2

Thread: IIS7 URL Rewriting Problem

  1. #1
    Join Date
    May 2006
    Posts
    20

    IIS7 URL Rewriting Problem

    I am trying to rewrite URLs on an IIS7 server (yes, the URL rewrite module is installed) and it works fine for simple rules, but I need it to work with a map. This is the code copied straight from the IIS website that I would have thought should work, but does not:

    HTML Code:
    <configuration>
      <system.webServer>
    	<rewrite>
    	  	<rewriteMaps>
    			<rewriteMap name="StaticRewrites" defaultValue="">
    				<add key="/randomtest1" value="/rewritten/index.phpi=1" />
    				<add key="/randomtest2" value="/rewritten/index.php?i=2" />
    			</rewriteMap>
        	</rewriteMaps>
    		<rules>
    			<rule name="Rewrite Rule">
    				<match url=".*" />
    				<conditions>
    					<add input="{StaticRewrites:{REQUEST_URI}}" pattern="(.+)" />
    				</conditions>
    				<action type="Rewrite" url="{C:1}" appendQueryString="False" />
    			</rule>
    		</rules>
    	</rewrite>
      </system.webServer>
    </configuration>
    Sorry if the XML above formats strangely...

    Anyone got any ideas on what might be wrong? Thanks!

  2. #2
    Join Date
    Mar 2010
    Posts
    44
    I wish i could help but i switched over to Apache after basically...well ditching almost everything microsoft. I too had a similar problem, check this website out there are devs on there that im sure could help. That's where i got almost all my help when i was running an IIS server.

    http://forums.iis.net/

Similar Threads

  1. Problem with ASCII and URL encoding
    By hidz_stitch in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 13 May 2009, 09:34 AM
  2. URL Rewriting problem in .NET
    By sajjadlogic in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 20 Jun 2006, 10:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •