Forum Discussion
Wil_Schultz_101
Nimbostratus
Jun 28, 2006ReWriting a URI assitance
Hey everyone, I need a bit of help rewriting a URI...
What I have today is:
http://www1.domain.com/dir1/variable/length/URI/page.ext
What I would like to happen is for it to redirect to
http://www2.domain.com/dir2/variable/length/URI/page.ext
Both www1 and www2 are already built at different IP's and seem to work fine... I can set up a redirect in www1 that if uri_starts with /dir1/%u to redirect it to http://www2.domain.com/dir2/%u but it seems to end up taking it to http://www2.domain.com/dir2/dir1/%u
So in the end I would like:
http://www1.domain.com/dir1/%u
-to magically turn into
http://www2.domain.com/dir2/%u
I appriciate any guidence, thanks!
Version is 4.6.4
3 Replies
- Wil_Schultz_101
Nimbostratus
Okay, looks like there is a thread below that helped me solve this...
http://devcentral.f5.com/Default.aspx?tabid=28&forumid=16&postid=7828&view=topic
Since I'm already here I may as well ask, in the string:
redirect to "https://" + http_host + "/xyz" + findstr(http_uri, "/abc", 4)
does the '4' in the findstr() function cause a deletion of 4 char's? That's what it would seem but thought that I should get conformation.
Thanks again, - Wil_Schultz_101
Nimbostratus
Found the answer here:
http://tech.f5.com/home/bigip/manuals/bigip4_5/bigip4_5ref/BIGip_rules.html
Sorry for taking up space... - No problem. Thanks for posting the link to the solution.
-Joe
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