Forum Discussion
JTucker_137331
Nimbostratus
Feb 12, 2015set Response_Redirect Question
Hi,
We have a Wordpress site that I would like to redirect requests for the admin pages to another location, I have an iRule that looks like this:
when HTTP_REQUEST priority 10 {
unset -no...
Hannes_Rapp
Nimbostratus
Feb 12, 2015Your current iRule does not do anything besides consuming memory. Are you sure you've pasted everything?
Try something as below:
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"*/wp-admin" -
"*/wp-login.php" {
HTTP::respond 302 location "http://www.asite.com/"
event disable
TCP::close
Forces a temp redirect to a given location (non-cacheable). Instructs F5 to stop processing the HTTPrequest event. The TCP connection record will be removed from the connections table.
} default {
pool Pool_Live_newsroom_HTTP80
Instructs F5 to select a pool specified. Assuming this is the same as your VS default pool, this section can be removed from the iRule.
}
}
}
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
