Forum Discussion

Richard_130847's avatar
Richard_130847
Icon for Nimbostratus rankNimbostratus
Oct 15, 2013

We would like to do proxy pass to alias a URL 1 with URL 2 (with a virtual directory) but using the same content for URL 1

We have two load balanced sites through the F5, 'http://www.richmondamerican.com' and 'http://how-to-buy-a-home.richmondamerican.com', both using 2 different IP addresses. We would like to do proxy pass the name of the second load balanced site, 'http://how-to-buy-a-home.richmondamerican.com[HTTP::uri]', to 'http://www.richmondamerican.com/blog/[HTTP::uri]'. How do we configure F5 load balancer to do this in using iRule LTM?

 

The iRules articles/documentation for don't seem that easy to use for proxies (LTM). We would just like simple examples. Do we set the following, RewriteResponsePayload (set to 2 to change host and path) and stream_expression_cmd.

 

set static::RewriteResponsePayload 2 set stream_expression_cmd "STREAM::expression

 

Any help would be greatly appreciated like a simple example.

 

Thanks, -Richard

 

7 Replies

  • We need this for SEO, generates more traffic doing it this way from our SEO consultants.

     

    • Mohamed_Lrhazi's avatar
      Mohamed_Lrhazi
      Icon for Altocumulus rankAltocumulus
      Thanks Richard.... It might be just me, but am not sure you are explaining your needs clearly enough. I am suspecting the solution to your needs is not in iRules or stream profile... Stream profile is for replacing a string with another, in the server response.... When we receive the HTML, or css or js, content from the back end server, and before we send it to the client, find every occurance of string foo, replace it with string bar. Is that really what you are asking about? You said those two domain names resolve to two different IP addresses... do you have a virtual server for each of those? each virtual has its own pool? or is it the same pool? What backend servers? why cant the back end server answer the request directly, instead of having to proxy it at the virtual server? Internet users somehow end up with this URL which they then need to request: http://how-to-buy-a-home.richmondamerican.com/some/path?maybe=some.params... That URL is a problem? Why? You dont have a Virtual Server + Pool that can handle it? Who created those URLs? Can it be fixed there? Anyways: On an F5 virtual server, using HTTP profile, you can indeed use "Stream Profile" to modify the content, usualy HTML/JavaScript/CSS... as text string find and replace. So you could say "requite this string, whereever oit may appear in byte stream, with this other string. See here for examples: "STREAM"
  • Cool, yes the two URLs have their own ip virtual addresses have their own virtual servers and own pools. We would just like to do this for SEO purposes. To have a simple example, let's say we have msn.com and espn.com with their own ip addresses, own virtual servers, and own pools. We would like for msn.com to be changed in the URL of the browser to espn.com\msn but still contain the msn.com web content. What's the best way do this?

     

    Thanks

     

  • OK. You are espn.com you aquired msn.com and you merged the data centers. You want eveybody to use espn.com, and not msn.com anymore. Close enough?

     

    1: Dont produce any links to msn.com anymore. Tell your web devolopers.

     

    2: On the virtual servers that are still producing content which includes msn.com links, use STREAM profile to fix the URLs. This should be a temporary fix while you track down the devolopers that did not comply with previous derective and fire them.

     

    Now, after you implemeted the above two steps... Some requests still arrive for msn.com! and you ask, can I have the F5 proxy them? Why? it's too late for any SEO considerations, no? Browsers, and search engines, should not stumble on msn.com links anymore... if they do, it's too late to fix. No?

     

    Hopefully somebody will jump in and correct me here... maybe am totally off on this one.

     

  • It's for performance and SEO reasons why we need to do this. Here is a better example of what we need to do, we have to sites www.msn.com and blog.msn.com that need to be on different servers because of performance (both of them have virtual servers and both of them are load balanced, so www.msn.com has 2 servers being used and blog.msn.com also has 2 different servers). We would like for blog.msn.com on the browser to be changed to www.msn.com/blog in the URI, but have the same web content for blog.msn.com. The reason for www.msn.com/blog is for SEO purposes where are searches in google and bing would be better.

     

    Thanks

     

  • All we really need is rewriting the response using the original url (blog.msn.com) web content with a different url in the browser URI (www.msn.com/blog).

     

    Any help would be greatly appreciated.

     

    Thanks