Forum Discussion
Joe_Pipitone
Nimbostratus
Mar 27, 2014Catching parameters in URI, rewriting.
We are migrating to a new forum system, and need to be able to support users who may have certain threads bookmarked. The topics and threads have all been imported into the new forum.
I have a sim...
uni_87886
Cirrostratus
Mar 28, 2014I don't think you are far off. Your second example contains both the FID and TID parameters, but in this case you ignore the FID one. If that is how it is meant to work, simply redirect by TID if it exists. If not, redirect by FID if it exists. i.e, it looks to me like TID takes priority over FID. Would the following do?
when HTTP_REQUEST {
if { [HTTP::query] contains "TID=" } {
HTTP::redirect "http://newforumsite.com/default.aspx?g=posts&t=[URI::query [HTTP::uri] TID]"
return
}
if { [HTTP::query] contains "FID=" } {
HTTP::redirect "http://newforumsite.com/default.aspx?g=topics&f=[URI::query [HTTP::uri] FID]"
return
}
HTTP::redirect "http://newforumsite.com/"
}
- uni_87886Mar 28, 2014
Cirrostratus
If not, give before and after examples of all the combinations you want covered
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