Welcome to WebmasterWorld Guest from 54.147.44.93

Forum Moderators: ocean10000

Message Too Old, No Replies

Convert UPPER to lower Case

IIS Re-Write?

     

Angelis

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

10+ Year Member



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...

marcel

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

WebmasterWorld Senior Member 10+ Year Member



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>

Angelis

9:14 am on Nov 20, 2009 (gmt 0)

10+ Year Member



Excellent thanks Marcel.

Will give that a try.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month