Forum Discussion
DaveC_53879
Jul 26, 2011Nimbostratus
Return a 301 instead of 302
I need my redirects to return a 301 instead if a 302. The Web team is unable to track the rdirected requests because they return a 302. How can I change the rule below to return a 301?
when HTTP_REQUEST { if { [HTTP::host] starts_with "www."} {
HTTP::redirect ]
} elseif { [HTTP::host] starts_with "mydomain.com"} {
HTTP::redirect ]
There are more possible redirects in the irule which I've omitted, but they all use the same format. Thanks...
- hooleylistCirrostratusI don't think hostnames starting with a hyphen are valid. For example, I assumed for "-peoples.com" that you'd want to match anything ending with -peoples, so I had it as "*-peoples.com".
- DaveC_53879NimbostratusMy rule is below. I've changed the host names, but it accurately reflects the rule. It is still only returning a blank page. What am I missing? Thanks.
- I think it would be best if u clarify exactly what you're looking to accomplish here. If you're looking to catch every host that starts with www you will need the 'www.*' in hoolios example..
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