Re: Problems with a rewrite…

Splash Forums PrettyFaces Users Problems with a rewrite… Re: Problems with a rewrite…

#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