This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Redirecting to all lowercase URLs
Author
Message |
billr578
Newbie


Joined: 17 August 2006
Location: United States
Posts: 28
Posted: 20 January 2012 at 10:27am

Hi,

I'm running an ASP.NET web application that we're now
using all lowercase URLs for. I'm using the following
rewrite rules to handle it based on some other forum
topics I found here:

RewriteCond %{REQUEST_URI} !\.(?:axd|asmx)
RewriteCond %{REQUEST_URI} [A-Z] [OR]
RewriteCond %{QUERY_STRING} [A-Z]
RewriteRule .? %{REQUEST_URI}\?%{QUERY_STRING}
[CL,R=301,L]

Basically I'm ignoring any axd/asmx files (I might put
aspx files in there at some point). This will do a 301
redirect to the lowercase version of the URL, however, it
lowercases the query string as well, which I'm not in
favor of.

My question is, can this be achieved and if so, how would
I go about it. I saw some other forum topics discussing
this, but didn't find any suggestions that would actually
work. Thanks in advance!

Regards,
Bill Rowell
http://www.billrowell.com/
Back to Top Visit billr578's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 23 January 2012 at 6:10am

You may try the trick from How to lowercase matched string before comparison with map file entries? from FAQ

Regards
Andrew
Back to Top
 
billr578
Newbie


Joined: 17 August 2006
Location: United States
Posts: 28
Posted: 25 January 2012 at 11:13am

So the solution here was just to pull out the query string
bit and just lowercase the URI. I didn't think that the
query string would pass through properly, but it did.
Back to Top Visit billr578's Homepage
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version