Forum Discussion
johndegern_4568
Nimbostratus
Apr 30, 2010Forcing lowercase only works the first time
So I am trying to force ALL HTTP requests to lowercase and i'm using this rule:
when HTTP_REQUEST {
HTTP::path [string tolower [HTTP::path]]
}
It works on the host and it works if I manually enter www.domain.com/Url.aspx but if I click through any links it allows the Mixed case again.
Whiskey tango foxtrot?!?
- hoolio
Cirrostratus
Hi John, - Hamish
Cirrocumulus
Apart from asthetics, is this going to matter though? Domain names are case insensitive, so the request will always come back to the correct VS... When the request does come in, he iRUle will fire and you'll rewrite the URI to lowercase before the request is passed through to your backend server. - Michael_Yates
Nimbostratus
The first part of a URL is universally case insensitive [HTTP::host], but the URI [HTTP::uri]can be case sensitive depending on the operating system hosting the website. - johndegern_4568
Nimbostratus
The company I am doing this for hired a SEO consultant to give them recommendations. This is one of those recommendations. In the infinite wisdom of the developers they coded files using mixed case throughout the entire site. This is giving duplicate pages in the Page Ranks of multiple crawlers. - johndegern_4568
Nimbostratus
Oh yeah...we are using IIS... - Michael_Yates
Nimbostratus
I think that the iRule is probably working, as this iRule is set to process everything. If you are using IIS, then it really doesn't matter because it really doesn't care, but you can still use the iRule to correct the case as it is presented to the server.when HTTP_REQUEST { HTTP::path [string tolower [HTTP::path]] log local0. "String to Lower iRule: [HTTP::path]" }
- hoolio
Cirrostratus
It's possible to do this in an iRule, but it could get very complicated and resource intensive. If you can't change the pages themselves, you could try rewriting the URLs in the HTML responses on the IIS servers. I think IIS URL rewrite plugin should support this: - johndegern_4568
Nimbostratus
That would be great, if only they offered 2.0 for IIS 6.0. I'm making them go back through the code and do it the right way. There is no reason to fit a square peg in a round hole just cause they hired bad developers.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects