Forum Discussion
Full host name/URL translation
dear experts i want translate all links in web site body. for example in site body i have multiple links such as web.example.net , mail.example.net and so on . i wand translate all ink in body to web.example.con. some thing like this : Full host name/URL translation in following link http://help.fortinet.com/fweb/582/Content/FortiWeb/fortiweb-admin/application_delivery.htmapplication_delivery_1557589163_935296
warmest regards
- youssef1
Cumulonimbus
Hi,
try this (replace Host header), use this irule if you want to maintain your URI and change host header:
when HTTP_REQUEST { if { [HTTP::host] eq "web.example.con" } { HTTP::header replace "Host" "help.fortinet.com" } } `
If you want to rewrite host and uri (redirect from / to uri that you specify)
`when HTTP_REQUEST { if { [HTTP::host] eq "web.example.con" } { HTTP::header replace "Host" "help.fortinet.com" } if {[HTTP::uri] qe "/"} { HTTP::redirect "/fweb/582/Content/FortiWeb/fortiweb-admin/application_delivery.htmapplication_delivery_1557589163_935296" } }
you can also use HTTP::uri instead HTTP::redirect if you want a transparent redirection.
Keep me in touch if you need more details.
regards.
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