Forum Discussion
Jim_Jack_103645
Nimbostratus
Feb 19, 2007remove trailing periods
We are receiving a number of users trying to access our webpages but they put a trailing period in the URL e.g.:
'http://www.thesite.com./Default.aspx'
Note the '.com.'
How can I remove the trailing period so that the headers match?
i.e. URL should be:
'http://www.thesite.com/Default.aspx'
- hoolio
Cirrostratus
It seems a bit strange that users would add a trailing period, but...when HTTP_REQUEST { if { [HTTP_HOST ends_with "." }{ HTTP::host [string trimright [HTTP::host] "."] } }
when HTTP_REQUEST { if { [HTTP_HOST ends_with "." }{ set host_original [HTTP::host] set host_trimmed [string trimright [HTTP::host] "."] log local0. "\$host_original: $host_original" log local0. "\$host_trimmed: $host_trimmed" HTTP::host [string trimright $host_original "."] } }
- Jim_Jack_103645
Nimbostratus
Many thanks.
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