Forum Discussion
maher_69299
Nimbostratus
Feb 02, 2010Redirecting URL with IP address to same URL that have the domain name
Hello Everyone
We have users accessing our web site using the IP address instead of the domain name. For example they use 192.0.32.10 on the browser to access www.example.com. How can I re-route them if they use the IP address to domain name URL instead of the IP address. Thanks
- maher_69299
Nimbostratus
I need a similar IRULE like the one posted by Aaron "for a different issue" but to redirect the IP address instead of the "www.app.mydomain.com" - hoolio
Cirrostratus
Hi Maher,when HTTP_REQUEST { Check if host header value is not www.example.com if {not ([string tolower [HTTP::host]] eq "www.example.com")}{ Send a 301 redirect HTTP::respond 301 Location "http://www.example.com/" } }
- maher_69299
Nimbostratus
I think I got it .. I just changed the name after the " " to an IP address and it works - maher_69299
Nimbostratus
Thanks Aaron. I guess I replied before seeing your post. I used your other Irule and it works. I will try the last Irule you posted since it seems more general than specifying an IP address. Thanks again
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