You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Keith <ke...@kjsdesigns.com> on 2006/02/12 21:23:55 UTC
RE: Configuring Turbine / Velocity to have "nice" URLs
Hi Again All,
Just answering my own question here for anyone else who wanted "Search
engine friendly urls" in turbine / turbine tomcat.
This solution uses Tomcat "Filters" and involves:
1. A jar,
2. A modification to project-web.xml, and
3. A utility configuration file (I like to put it in my WEB-INF/conf
directory as it works well in a maven environment)
The instructions on the following page works perfectly with turbine:
http://www.zlatkovic.com/httpredirectfilter.en.html
This allows you to have nice urls like:
http://mywebsite.com/search_term
Instead of:
http://mywebsite.com/app/template/search_term.vm
Hope others find this useful.
Cheers,
Keith
-----Original Message-----
From: Keith [mailto:keith@kjsdesigns.com]
Sent: Tuesday, November 29, 2005 12:04 PM
To: turbine-user@jakarta.apache.org
Subject: Configuring Turbine / Velocity to have "nice" URLs
Hi All,
I'm working on my second Turbine 2.3 project, have 3 quick URL questions;
I'll list them independent of each other, though I'd like to see all three
implemented simultaneously:
=========== 1. How do I make it so that: ==========
http://mydomain.com/app/template/anyscreen.vm
can be referenced as:
http://mydomain.com/anyscreen.vm
========== 2. How do I make it so that: ==========
http://mydomain.com/app/template/any_screen_subdirectory%2Cindex.vm
can be referenced as:
http://mydomain.com/app/template/any_screen_subdirectory
========== 3. How do I make it so that: ==========
http://mydomain.com/app/template/any_screen_subdirectory%2Cany_file.vm
can be referenced as:
http://mydomain.com/app/template/any_screen_subdirectory[some_nice_character
]anyfile_vm
Where [some_nice_character] is for instance "-" or "/" (clearly if it was
"-" then I'd have to be sure that my template/classnames wouldn't have any
"-"s in them).
Thank you,
________________
Keith Seim
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org