Redirect from one masking url to another masking url

Splash Forums PrettyFaces Users Redirect from one masking url to another masking url

This topic contains 1 reply, has 2 voices, and was last updated by  Christian Kaltepoth 2 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27246

    vbb
    Participant

    Hi All,

    Any one having an idea on the redirecting from one masking URL to another masking URL.
    Example:
    I have view id (or original page URL) is ‘http://mydomain.com/pages/common/user/register.xhtml’ and I have configured it in pretty-cofig.xml as below with masking url like ‘http://mydomain.com/user/register.en.html’

    <url-mapping id=”allUsrRegister”>
    <pattern value=”/user/{registerLanguage}.html” />
    <view-id value=”/pages/common/user/register.xhtml” />
    </url-mapping>

    Now user is accessing the link like ‘http://mydomain.com/register.en.html’ (where /user/ is missing) and I wanted to redirects to the link ‘http://mydomain.com/user/register.en.html’. How can we achieve this in prettyfaces. Any body can help on the same.

    #27247

    You can use the <rewrite> element for something like this.

    Something like:

    <rewrite match="^/register\.(\w+)\.html$" substitute="/user/register.$1.html" redirect="301" />
    

    Have a look here for details:

    http://www.ocpsoft.org/docs/prettyfaces/3.3.3/en-US/html/inbound_rewriting.html

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Comments are closed.