Problems with a rewrite…

Splash Forums PrettyFaces Users Problems with a rewrite…

This topic contains 3 replies, has 2 voices, and was last updated by  balteo 6 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18006

    balteo
    Participant

    Hello,

    I am having problems with the following rewrite:

    <rewrite match=”^/redirigeVersSculpture/(fr|en)/(d+)$” substitute=”/RedirigeVersSculptureServlet?abonneLocale=$1&sculptureID=$2″ redirect=”chain”/>

    It correctly picks up the sculptureID request parameter but fails to pick up the abonneLocale parameter. Can anyone please help?

    Regards,

    Julien.

    I use version 3.3.0 of pretty faces.

    #21240

    balteo
    Participant

    note that I do have the following “ampersand sign” + amp +”;” in my pretty faces config file.

    #21241

    Hey Julien,

    I just tried you rewrite rule and it seems to work fine. I changed the redirect attribute to 301 and tested it with curl:

    ck@zeus:~$ curl -v "http://localhost:8080/prettyfaces-demo/redirigeVersSculpture/en/1234"
    * About to connect() to localhost port 8080 (#0)
    * Trying ::1... connected
    * Connected to localhost (::1) port 8080 (#0)
    > GET /prettyfaces-demo/redirigeVersSculpture/en/1234 HTTP/1.1
    > User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
    > Host: localhost:8080
    > Accept: */*
    >
    < HTTP/1.1 301 Moved Permanently
    < Server: Apache-Coyote/1.1
    < Location: /prettyfaces-demo/RedirigeVersSculptureServlet?abonneLocale=en&sculptureID=1234
    < Transfer-Encoding: chunked
    < Date: Sun, 07 Aug 2011 14:56:55 GMT
    <
    * Connection #0 to host localhost left intact
    * Closing connection #0

    As you see both query parameters are present in the resulting URL. I used PrettyFaces 3.3.0 for the tests.

    Christian

    #21242

    balteo
    Participant

    Christian,

    My mistake. The problem was indeed somewhere else…

    Thanks!

    Julien.

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

You must be logged in to reply to this topic.

Comments are closed.