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)

#21963

Yeah, I see! Now as I think more about my example I think it should work with both PrettyFaces and Rewrite. You are completely right!

However if I understood @ceefour correctly, his problem is a bit different. My example was misleading. Let me try to describe another example that is more similar to his use case.

Imagine the following two mappings:

/project/#{projectName}
/user/#{username}

So you have URLs like:

/project/prettyfaces
/user/chkal

Now what @ceefour is trying to achieve is some kind of composite mapping:

/#{name}

Some code has to look into the database and find out if the name identifies a project or a user and then forwards/redirects to the correct URL:

/chkal        ->    /user/chkal
/prettyfaces -> /project/prettyfaces

@ceefour: Is this description correct?

I think something like this could be implemented with PrettyFaces 3.x either with a custom rewrite processor (like described above) or perhaps using dynaview?