View Full Version : URL Rewriting
stephenro
08-18-2005, 06:06 PM
Any way to do url rewriting with Spring.web?
Thanks,
Steve
Erich Eichinger
07-31-2007, 06:17 AM
Hi,
sorry for the late response ;-) - but for others searching the forum:
I've got already well-tested code for rewriting urls (both incoming and outgoing). If someone is interested to pick this up and integrate it with Spring.Web I will be happy to move it into CVS!
cheers,
Erich
Search is king!
I'm currently writing an application to learn spring.web and web development in general *shivers*. One of the things I wanted to do is url rewriting. I'm intrested in what you've written so far and I'll gladly integrate it if I can.
Erich Eichinger
09-21-2007, 08:57 AM
Hi Ben,
I just sent you an email with the sources. Please let us know your progress.
cheers,
Erich
rolandz
10-06-2007, 09:35 AM
Hi,
I've got already well-tested code for rewriting urls (both incoming and outgoing). If someone is interested to pick this up and integrate it with Spring.Web I will be happy to move it into CVS!
I would be happy to see it in the CVS :) BTW - what is the current state of url rewriting?
Erich Eichinger
10-07-2007, 09:23 AM
Hi all,
maybe we can put the code into subversion on code.google.com until it has reached a certain degree of stability. After releasing 1.1 in late october we will be moving to sf svn - which gives us a bit more flexibility I hope.
Ben, how's your progess? Is there anything I can do to help? What do you think about moving it to google for now?
-Erich
Sure.
So far I've only browsed through the code.
Erich Eichinger
11-20-2007, 12:37 AM
Hi ben,
any news on the rewriting front?
cheers,
Erich
Shane
12-04-2007, 02:28 AM
No news? I too am curious about this. I was hoping to leverage this as well to produce friendly URLs that are not .NET dependent (i.e. urlmappings, etc). Anyhow, updates on this would be greatly appreciated. I'm assuming this would be configured something like the SimpleUrlHandlerMapping as its Java counterpart.
Time flies :oops:
I've put it in my agenda, I'll pingback later this week. The code you've provided allready does most of the work. Are there any guidelines, except common sense I need to follow?
Erich Eichinger
12-05-2007, 07:59 PM
Hi ben,
Great news!
i usually trust common sense ;-). There are a few coding guidelines for the Spring framework that can be found on our wiki (http://opensource.atlassian.com/confluence/spring/display/NET/Coding+Conventions). But more or less the code should already be in shape according to those guidelines.
If I can be of any more help, just let me know.
cheers,
Erich
For those interested: http://code.google.com/p/urlrewriter/
I hope to make more changes in the comming weeks.
shwetac
02-28-2008, 06:51 AM
Hi Erich
Can u please provide me with the code for rewriting urls as i urgently require it for integreting it my application.
Email Id - shweta.er2007@gmail.com
Thanks
Shweta
Hi,
sorry for the late response ;-) - but for others searching the forum:
I've got already well-tested code for rewriting urls (both incoming and outgoing). If someone is interested to pick this up and integrate it with Spring.Web I will be happy to move it into CVS!
cheers,
Erich
shwetac
02-28-2008, 07:02 AM
Hi,
Can anyone provide me with the code for rewriting urls using spring framework. As i urgently require it for integrating it in my java application.
Email ID - shweta.er2007@gmail.com
Thanks
shweta
Erich Eichinger
02-28-2008, 07:14 AM
Hi,
please check out the code at code.google.com as posted by .ben above
-Erich
Aaron Torgerson
10-03-2008, 09:49 PM
I know this thread is REALLY old, but I'm interested in the Url Rewriting component as well. Currently we're using UrlRewriting.net, which doesn't play nice with the Spring Web Framework.
Has anyone begun using this? Had success? Are there new alternatives?
Many thanks!
Aaron
I've only made minor changes to the code provided by Erich, there are still improvements to be made. But since I don't do a lot of web development I kept this on a side track. I've only tested it with the sample included in the source.
chrisjsmith
10-08-2008, 10:41 AM
Microsoft provide an off the shelf rewriting system in System.Web.Routing bundled with ASP.Net MVC Preview 5. This will be MS supported indefinitely so it's the best bet for us.
Erich Eichinger
10-08-2008, 12:15 PM
Hi,
as Chris mentions, ASPNET.MVC will contain the Routing library that might fit your needs. I didn't have time yet to test it in combination with Spring though.
You might also want to look at the brand new IIS7 Rewrite module (http://www.infoq.com/news/2008/10/IIS-URL-Live).
My Url rewriting code found at http://code.google.com/p/urlrewriter/ is in production for some customer websites of my former company for almost 2 years now - see e.g. http://www.panoramatours.com/. When browsing different hotels, you will notice, that there are no Guids in the urls, although they are heavily used underneath. The important feature here compared to other rewriting solutions is, that not only incoming urls are mapped to internal urls, but one may also rewrite urls contained in response bodies - very similar to mod_rewrite.
There's a small, but in some cases important technical difference in the implementation of Routing and my UrlRewriter:
UrlRoutingModule just hooks into the request pipeline around the MapHandler stage (PostResolveRequestCache and PostMapRequestHandler) to tweak the runtime to load its own handler. Thus your application and all other modules will always see the original url used when submitting the request.
UrlRewriter in contrast rewrites the Url at the very beginning of the request, which means that your application will never see the original url, but only the rewritten url - making rewriting completely transparent to your application.
When coming across the UrlRewriting.NET project, my thoughts were to donate my code to them and integrate the feature set. What are the issues you are experiencing with combining Spring.NET and UrlRewriting.NET?
tx,
Erich
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.