List Info

Thread: Configuring Turbine / Velocity to have "nice" URLs




Configuring Turbine / Velocity to have "nice" URLs
user name
2006-02-12 20:23:55
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:

h
ttp://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:keithkjsdesigns.com] 
Sent: Tuesday, November 29, 2005 12:04 PM
To: turbine-userjakarta.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_s
ubdirectory%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_scree
n_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-unsubscribejakarta.apache.org
For additional commands, e-mail: turbine-user-helpjakarta.apache.org



------------------------------------------------------------
---------
To unsubscribe, e-mail: turbine-user-unsubscribejakarta.apache.org
For additional commands, e-mail: turbine-user-helpjakarta.apache.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )