views:

206

answers:

2

I am trying to rewrite the URL

From ---> http://www.onnlist.com/punerealestate.jsp?section=realestate&file=pune

To -----> myserver/realestate/pune/punerealestate.html

my suggested .htaccess is --->

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^([^/]+)/([^/]+)/punerealestate.html /punerealestate.jsp?section=$1&file=$2 [L]

I am putting .htaccess file on my server .. @ .. /webapps/ROOT directory

I am not sure if my htaccess file is wrong or my server does not support it or i am placing it at wrong place.

I am using - Tomcat 6.0 and Java development environment ..

anyone any idea???

A: 

Assuming myserver is your domain:

RewriteEngine on
RewriteFule ^/([a-z0-9]+)/([a-z0-9]+)/([a-z0-9]+).html /$3.jsp?section=$1&file=$2
jusunlee
A: 

.htaccess files are for Apache httpd servers. You're using an Apache Tomcat server, so a .htaccess file won't work for you. I'm not too familiar with Tomcat, but I'm pretty sure there's a .xml or .properties file in your WEB-INF directory.

jimyi