Forum Discussion
Dixit_18200
Nimbostratus
Mar 07, 2017Need help in redirection
Hi,
I need help as we have a requirement to redirect from one site to another site by keeping all content after / as same...example..if user tries to access abc.com/aa it should redirect to def....
Stephane_Viau
Nimbostratus
Mar 07, 2017Dixit,
Use the following iRule :
when HTTP_REQUEST {
HTTP::respond 301 Location http://nameofyournewsite.com[HTTP::uri]
}
Just replace 301 by 302 if it's temporary and replace [HTTP::uri] by [HTTP::path] if you wish to keep the path but not the query string. [HTTP::uri] will keep both path and query string.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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