Forum Discussion
MihirP1129
Jul 03, 2019Nimbostratus
iRule to add www without changing URL
Hello F5 community, Is there a way to add www in front of the URL while keeping the URL intact? For example: https://abc.com/testfolder/blahblahblah changed to https://WWW.abc.com/testfolder/...
- Jul 05, 2019
Do you want to change Host header sent from the client in server side connection or do you want to redirect the client to https://WWW.abc.com/testfolder/blahblahblah
to redirect the client, use following code
when HTTP_REQUEST { if {[HTTP::host] eq "abc.com"} { HTTP::redirect "https://www.abc.com[HTTP::uri]" } }
MihirP1129
Nimbostratus
I tried this irule and it didn't work, because when I try to hit abc.com/blahblahbalhID, nothing happened.
Stanislas_Piro2
Jul 05, 2019Cumulonimbus
Unlikely! You may have done wrong change to match your real host
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