daily dynamic url

Splash Forums Rewrite Users daily dynamic url

This topic contains 9 replies, has 3 voices, and was last updated by  arcturus 6 years, 11 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #26875


    Hiii guys.
    i’ve been wondering if i can rewrite my url dynamically, for example :
    today my url will be : http://www.domain.com/login/17/02/2015
    tomorrow : http://www.domain.com/login/18/02/2015

    in my code i’m writing something like : addRule(Join.path("/{page}").to("/views/{page}.xhtml"))



    You can do that. I’m not sure what you want to do with the dates, but…


    You might want to read the docs on parameterization, here: http://www.ocpsoft.org/rewrite/docs/configuration/parameters

    I hope this helps.




    thnx for reply,
    1st of all i want to tell u that documentation of rewrite doesnt works with me.

    what i’m trying to do is to encrypte/decrypte url params

    • This reply was modified 6 years, 11 months ago by  arcturus.

    Could you give me more details about the documentation not working? I would love to fix it!

    I still need more information to help you. Rewrite can do anything you want, but I’m not really certain about what you want. From what I can tell so far, you just want to issue a redirect to a random page in the application. This can be done using the Servlet API, and a rule like I proposed above (and even the one you wrote) should work fine. So far your question doesn’t seem related to rewrite, rather how you can implement a particular feature in your application πŸ™‚ So I’d like to help, but I need more info.

    Please provide (in addition to your current configuration and relevant code):

    1) The expected behavior.
    2) The behavior you are observing.




    please check attached file , its explain my use case

    • This reply was modified 6 years, 11 months ago by  arcturus.


    please check attached file, its describe my use case



    Hey, I’m trying to do something similar to this part of code :

    .where("page").convertedBy(new Converter<String>() {
    	public String convert(Rewrite event,
    	EvaluationContext context, Object value) {
              // transform somethingcrypted to login
    	  return "login";

    so basically, if i call this url http://localhost/project/private/somethingcrypted. prettyfaces will get somethingcrypted param and transform it to the real name of page (for example login). finally, rewrite can find corresponding page login.xhtml

    i hope if this clear up my issue, please help…thnx in advance

    • This reply was modified 6 years, 11 months ago by  arcturus.

    Basically the code looks good. Does it work if you hard-code the “login” value?


    Yeah, that should work fine. You might also consider using a .transposedBy(Transposition x) instead of using a Converter. You might have to convert/transpose both ways “login -> 345678965” and “345678965 -> login” depending on inbound vs. outbound processing.



    Thnx both of u for reply.
    Mr @lincoln i tried what u said and its works fine πŸ™‚
    thanks again for your help

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

The forum ‘Rewrite Users’ is closed to new topics and replies.

Comments are closed.