Forum Discussion
Joe_Pipitone
Nimbostratus
Mar 02, 2011Regex
I've been requested to perform a rewrite / redirect which does the following:
http://subdomain.ourcompany.com/webext/01.aspx?status=error (pass the 01 over to the url below and say id=thatNu...
Mar 02, 2011
No change is necessary. This will work for any length number. Since I'm using the "string first" to get the index of the ".aspx" that will increase the larger the id is.
For this:
http://server/webext/123.aspx?status=error
idxStart would be where the "1" is and idxEnd would be where the "3" is. The string range will then return "123"
For
http://server/webext/123456789.aspx?status=error
idxStart would be the "1" and idxEnd would be where the "9" is. The string range will then return "123456789"
Keep in mind that this does no validation that what's in the URI in that section is actually a number. For
http://server/webext/foo/bar/yahoo.aspx?status=error
The extracted ID would be "foo/bar/yahoo". But I'm assuming that you know the format of the application. You might want to thrown in a verification check in there.
-Joe
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