Re: http://domain.com/{username} Short URLs or catchall (Facebook-style)

Splash Forums PrettyFaces Users http://domain.com/{username} Short URLs or catchall (Facebook-style) Re: http://domain.com/{username} Short URLs or catchall (Facebook-style)

#21966

youneskhan
Participant

I was able to get this style of working but not fully though.

I am using latest Prettyfaces with SEAM 2.2.2 and JSF 1.2. And I have below in my pretty-config.xml (below shows only part of it).

<rewrite match=”^/([a-zA-Z0-9-]+)(/?)$” trailingSlash=”append” toCase=”lowercase” />

<url-mapping id=”userPage”>

<pattern>/#{username}/</pattern>

<view-id>/view/viewUser.seam</view-id>

</url-mapping>

It works only when I use the url like “/khan/” but when I use like this “/khan”, it shows me a 404 error.

And I have configured a page action in pages.xml and was able to see the page action being called in both the cases, but the later results in 404.

Any info why it does happen.

Let me know If I need to move this to a new thread.