Forum Discussion
Farid_Jabari_36
Nimbostratus
Sep 12, 2018Full 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...
youssef1
Cumulonimbus
Sep 12, 2018Hi,
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
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