Forum Discussion
How to remove an extension added automatically to an URL
Hello F5 experts,
We have a website that adds at the end of URL --FR (for example if your language is french), but the problem is that F5 revesre proxy is not displaying the page when we add the --XX once your remove this character the page is well displayed, by the way I have checked the ASM logs it's not coming from their, so to solve my problem I want to write an iRule removing the last part of the link which is --XX, to do so, I have found the command below:
rewrite ^/data/public/([.a-zA-Z0-9_-]+)--([a-z-]+)$ /data/public/share.php?hash=$1&lang=$2; rewrite ^/data/public/([a-zA-Z0-9_-]+)$ /data/public/share.php?hash=$1;
Could you please help me write the whole iRule based on these commands to solve my issue ?
Thanks, Khadija
- Henrik_Gyllkran
Nimbostratus
Are there other instances of a double dash in the URI? If not it could be made very simple:
when HTTP_REQUEST { if { [HTTP::uri] contains "--" }{ HTTP::uri [substr [HTTP::uri] 0 "--"] } }
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