Forum Discussion
Simple redirect rewrite
I have a site that is using the following url
https://propworks.abc.com/propworks
Now the default http to https redirect works
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
Now, they would like it if a user just types "propworks" in the browser it redirects to the https url above.
So I went and tried this and had no luck.
when HTTP_REQUEST {
if { [HTTP::host] eq "propworks" } {
HTTP::redirect "https://propworks.abc.com/propworks"
}
}
I then tried
when HTTP_REQUEST {
if {[HTTP::host] eq "propworks.abc.com"} {
HTTP::redirect "https://propworks.abc.com[HTTP::uri]"
}
}
That did nothing either...
any thoughts ? This reallly has me aggravated right now :)
Thanks
Shawn
6 Replies
- What_Lies_Bene1
Cirrostratus
Are there actually DNS entries in place for 'propworks' and 'propworks.abc.com', which resolve to the VS IP?
- shawn306_84070
Nimbostratus
A ping to either propworks.abc.com but not propworks - shawn306_84070
Nimbostratus
A ping to propworks.abc.com works. Propworks does not - What_Lies_Bene1
Cirrostratus
OK, so that explains the issue when users use just propworks; there's no DNS resolution so the traffic never gets to the F5 and the rule never runs on that traffic.
Regarding the third rule out of the three above, assuming it's applied to the HTTP VS then there's no need for it, the first rule covers it. - shawn306_84070
Nimbostratus
I was kinda wondering why when I put in propworks it did not redirect. I'll have our dns guy check it out.
Thanks !!!!! - What_Lies_Bene1
Cirrostratus
You're welcome.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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