views:

20

answers:

2

hi all i have my app configured with mod ajp to be as follows:

http://www.myapp.com/myapp

so when i request a page like mypage, the url will be

http://www.myapp.com/myapp/mypage

and i want when the user requests the page

the url is displayed as:

http://www.myapp.com/mypage

instead of

http://www.myapp.com/myapp/mypage

any ideas how to do so ?

A: 

Try this rule:

RewriteRule !^/myapp/ /myapp%{REQUEST_URI} [L]

And to redirect requests of the “wrong” path:

RewriteCond %{THE_REQUEST} ^[A-Z]+\ /myapp/
RewriteRule ^/myapp/(.*) /$1 [L,R=301]
Gumbo
sorry man, it didn't work, the behaviour stills the same, any ideas why ?
sword101
@sword101: Do you want to use this in an .htaccess file?
Gumbo
no i need to add it as rule in apache configuration , and i am using apache with tomcat so i don;t have .htaccess file
sword101
+1  A: 

problem solved after installing a fresh copy of tomcat

sword101