The only required part is everything up to the thread ID (http://www.coderanch.com/t/572113/), everything behind that is not significant and can be chosen at will (or left out altogether). So there's no "rewriting" going on here.
But there's nothing to it. If "http://www.coderanch.com/t/572113/" is the integral URL, all you need to do is to set up whatever code handles "/t" URLs to extract the ID from the URL and ignore everything that comes after it.
Joined: Nov 23, 2011
Thanks for understanding my need Wayan..
Ulf Dittmer you are right but how can i cancat title or subject of topic before fetch. As per your suggestion "http://www.coderanch.com/t/572113/" based on 572113 id i will fetch topic from db. but i need url like this http://www.coderanch.com/t/572347/Servlets/java/Servlet-Asynchronous-Operations ,which is not possible before fetching..
Sorry i am stretching this topic but solution is really helpful for me
Joined: Mar 22, 2005
What do you mean by "fetching", and what does a DB have to do with non-functional parts of an URL? Wherever you want to display the URL, just append whatever you want appended, and then ignore it when interpreting it on the server. That has no bearing on how the page that's behind the URL is stored or retrieved.
Joined: Apr 05, 2012
Thanks guys, this post helped me a lot, I was going to ask about this issue but I found that Ramesh already asked it