Forum Discussion

tobs_93015's avatar
tobs_93015
Icon for Nimbostratus rankNimbostratus
Feb 18, 2009

How to use iRule to mask URL path

Hi,

 

 

I would like to mask my home page URL path via an iRule condition because currently when a user navigate to my domain (http://www.mysite.com), it is redirected to an MCMS server base content (http://www.mysite.com/home/default.htm). I would just like to hide or mask that redirected path via iRule code so when a user navigates to my home page, the address bar will only display my domain URL (http://www.mysite.com).

 

 

Illustration:

 

From:

 

http://www.mysite.com/home/default.htm

 

To:

 

http://www.mysite.com

 

 

Can anyone suggests some options I can try?

 

 

In addition to this, I would like to ask what is the difference between HTTP::path and HTTP::uri and which of these will best support my objective (masking the URL)

 

 

Kindly advice, thanks!

 

3 Replies

  • Hello,

     

     

    Are you running BIG-IP LTM v9 or v4.x? It isn't possible to rewrite HTTP requests in 4.x. For 9.x, you can post future questions in the other forum (Click here) to get more relevant eyes on your post.

     

     

    HTTP::path (Click here) allows you to get or set the portion of the URI up to the query string.

     

     

    HTTP::uri (Click here) allows you to get or set the entire URI including the path and the query string.

     

     

    Are you wanting to mask the URL for every request? Or just for a specific requested path? If the latter, take a look at this post for information on why it's not really possible (Click here). If the latter, you can use HTTP::uri or HTTP::path to rewrite the request before it's sent to the pool.

     

     

    Aaron
  • Hi hoolio,

     

     

    Thanks for your reply, I am afraid I'm a bit confused on your latter statements.

     

     

    I would just like to mask the URL whenever a user goes to my home page URL (which is set currently at http://www.mysite.com/home/default.htm) to only show my domain in the address bar (http://www.mysite.com). Is this possible?
  • Hi hoolio,

     

     

    Thanks for your reply, I am afraid I'm a bit confused on your latter statements.

     

     

    I would just like to mask the URL whenever a user goes to my home page URL (which is set currently at http://www.mysite.com/home/default.htm) to only show my domain in the address bar (http://www.mysite.com). Is this possible?