Forum Discussion

Puli's avatar
Puli
Icon for Nimbostratus rankNimbostratus
Dec 09, 2010

Problem with # in URLs

Am parsing below types of URLs in an iRule

 

 

www.abc.com/docs/example1.html re-directs to www.abc.com/newdocs/example1.html

 

www.abc.com/docs/example1.htmlhic re-directs to www.abc.com/newdocs/example1.html

 

www.abc.com/docs/example1.html?l=en re-directs to www.abc.com/newdocs/example1.html

 

 

Am using

 

set base [HTTP::path] to the uri and search that in a datagroup and re-directs accordingly.

 

 

Am having a problem with the second url in Firefox and chrome

 

when accessed www.abc.com/docs/example1.htmlhic

 

FF and chrome appends hic to the response in the browser address bar. IE works fine.

 

 

Any ideas how i can remove hic to not appear in Browser address bar.

 

 

I turned on logging but i cannot see hic comming in the request.

 

looks like browser is send only the uri part and ignoring hic and appending it to response.

 

How can i prevent it from doing that via an iRule.

 

Any tips.

 

 

Appreciate your help

 

Puli.

1 Reply

  • Hi Puli,

     

     

    The in URIs is an anchor tag. It's used to tell the browser where in an HTML document to focus the page. HTTP user agents shouldn't send the anchor tag in the HTTP request line. So HTTP::uri shouldn't show the anchor. If you want to logically remove the anchor from URIs for datagroup lookups, you could use getfield to split the path on and take the first field:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/getfield

     

     

    Aaron