OTS02's suggestion will work, but you have to consider other resources that are likely included. For instance, where are images, scripts, style sheets etc located?
In general, you may want to have a default server and a server for exceptions (e.g.
/something
). If possible, have the site owner use the subfolder for supporting files (images, style sheets, scripts) where that makes sense.
It can get tricky if you're using dynamic resources that require persistence even though they are hosted in different 'folders'. For instance, some .NET applications use
/websource.axd
for dynamically generated resources (e.g. images). If the page under
/something
instructs the client to request
/webresource.axd
you'll have to add some intelligence to the iRule to ensure that the request isn't routed to the other pool.
Also, consider that pages (especially the home page) can be called in a variety of ways. For instance, the home page could be
/
,
/index.html
,
/default.aspx
,
/index.php
, etc.
Lastly, you'll probably want to use
HTTP::path
instead of
HTTP::uri
as the latter includes the query string parameter, which would have an effect on the string comparison you'd be doing to route the request to the proper pool.