Forum Discussion
URI Masking in order to drop %20
Sharepoint admins thought it would be a good idea to add spaces to uri and after applying a patch form MS it broke the site. Sharepoint server no longer supports spaces. Concern is that if they fix sharepoint documents with hard links will fail. I was thinking that maybe we could use URI masking to drop the space (%20) from the server. I don't think the stream profile is the best way and without knowing every uri to issue redirects I think this is the best method but i'm open to suggestions.
Today: abc.com/global design/drawing.vsd - is sent to server as abc.com/global%20design/drawing.vsd This should now be sent to the server as: abc.com/globaldesign/drawing.vsd
So would something like this work?
when HTTP_REQUEST { if { [HTTP::uri] contains " " } { HTTP::uri "" } }
No, this would not work. Your iRule will set the HTTP::uri to nothing. Try something like this:
when HTTP_REQUEST { set uri [HTTP::uri] set new_uri [string map {"%20" ""} $uri] log local0. "$uri -> $new_uri" HTTP::uri $new_uri }
Recent Discussions
Related Content
* 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