Welcome to WebmasterWorld Guest from 54.196.217.43

Forum Moderators: ocean10000

Message Too Old, No Replies

Convert UPPER to lower Case

IIS Re-Write?

     
11:21 am on Nov 19, 2009 (gmt 0)

Full Member

10+ Year Member

joined:July 8, 2005
posts:348
votes: 0


Is there a way to change upper case file & directory names to lower case and redirect the upper case to lower case once this has been done?

This is an IIS server running .NET, not Apache.

I have been looking in Google for over an hour and cannot find anything...

11:46 am on Nov 19, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
posts:732
votes: 0


Are you using IIS7 with the rewrite module?

if so, you can add this rule to web.config:


<rules>
<rule name="Convert to lower case" stopProcessing="false">
<match url=".*[A-Z].*" ignoreCase="false"/>
<conditions>
<!-- The following condition prevents rule from rewriting requests to .axd files -->
<add input="{URL}" negate="true" pattern="\.axd$"/>
</conditions>
<action type="Redirect" url="{ToLower:{R:0}}" redirectType="Permanent"/>
</rule>
9:14 am on Nov 20, 2009 (gmt 0)

Full Member

10+ Year Member

joined:July 8, 2005
posts:348
votes: 0


Excellent thanks Marcel.

Will give that a try.