Forum Discussion
Marc_zw_57558
Nimbostratus
Aug 20, 2009HTTP::respond 301
An iRule newbie!
I want to perform a 301 redirect. I have a domain 'somedomain.com' that I want redirected with an HTTP 301 to 'www.somedomain.com.' The two uri's reference separate virtual servers so the iRule will only be applied to requests for somedomain.com. The iRule is as follows:
when HTTP_REQUEST {
if {[HTTP::uri] contains "domain.com" }{
HTTP::respond 301 Location "http://www.somedomain.com"
}
}
It does not work. When I try to browse to somedomain.com, I receive an HTTP/1.1 200 response from the real server displaying a page saying that there is an error (which is confusing in its own right)
Help?
- Laudec_107382
Nimbostratus
Hi, - Marc_zw_57558
Nimbostratus
Sweeeet. That worked a treat. Simple when you know how. Thanks for you help.
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