Forum Discussion
301 RESPONSE AND REDIRECT
Logic: if a hostname equals "test.fedbank.com" then it should respond 301 and redirect to "abc.bank.ca/,,,,,,,,,"
redirect user traffic to another URL with a 301 response using iRule.
For example, when the browser URL path is http://www.example.com/example-path and i want to redirect to http://secure.example2.com/example-path
- Injeyan_KostasAug 01, 2025
Nacreous
check this
when HTTP_REQUEST { if { [HTTP::host] equals "www.example.com" and [HTTP::path] equals "/example-path" } { HTTP::respond 301 Location "http://secure.example2.com/example-path" } }
- CHRISTY_THOMASAug 02, 2025
Cirrus
i have checked this rule, but this not working as expected. the desired redirection is happening towards new url but the application page is not loading.
requesting your suggestion
- Injeyan_KostasAug 02, 2025
Nacreous
If the redirection is happening, the rule works as expected.
If the application is not loading you have to check the application itself.
Does it work if you go derictly?
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