Forum Discussion
Try this to start ;-
when HTTP_REQUEST {
if { [HTTP::host] eq "abc.com" && [HTTP::path] eq "/"} {
HTTP::uri /article12/
}
}
Although it sounds as if your webserver is also performing 302 redirects unders some circumstances......
- jaikumar_f5Jan 24, 2017MVP
Well this helped on the 1st part. Thanks. But need help on URI Masking too. Accessing abc.com went to abc.com/article12 but the URI is seen. I do not want the URI to be seen. Just abc.com should be seen. Please advise. I guess we should be touch the response header ?
- IheartF5_45022Jan 24, 2017Nacreous
No, I suspect this may fix your problem (note have removed trailing /);-
when HTTP_REQUEST { if { [HTTP::host] eq "abc.com" && [HTTP::path] eq "/"} { HTTP::uri /article12 } }
If that doesn't work please explain what is happening ie server is sending a redirect ? What Location header?
- jaikumar_f5Jan 24, 2017MVP
Tried removing the trailing / too, no luck. Still seeing entire URI. I see 302 twice coming from webserver, its a big URI path starting with /article12/libs/granite/
- IheartF5_45022Jan 24, 2017Nacreous
OK so what's the big URI path that ends up in the browser address window?
That's what we need to rewrite your path to instead of /article12.....
- IheartF5_45022Jan 24, 2017Nacreous
Hint: It should end in ".html"
- jaikumar_f5Jan 24, 2017MVP
Hey IheartF5, thanks for your help. It worked.
If I copied the full URI /article12/libs/granite/core/content/login.html?resource=%2Fauthor-62%2F&$$login$$=%24%24login%24%24&j_reason=unknown&j_reason_code=unknown it dint work.
But I had to copy till /article12/libs/granite/core/content/login.html to make it work, provided it missed to get some image files and Web page looked little off from normal.
But there's a catch here. Once my users login into the portal, its showing the URI again. And if they logout too, it shows.
- IheartF5_45022Jan 25, 2017Nacreous
You can't 'hide' every URI. Well you can, but you have to reveal as something else. In the case above, you hid '/article12/libs/granite/core/content/login.html' as '/'.
BTW We use Abobe CQ as well and our website guys didn't like the trailing ".html' extension on every page - they liked 'extentionless' page names, so the only page name we have are like /products, which we then rewrite on the LTM as /xxx/products.html.