apache mod_rewrite
- by eduard-schnittlauch
Hi,
I want mod_rewrite to do this:
http://server/* - redirect to http://server/app/*
http://server/app/* should not be redirected
http://server.domain/* - redirect to http://server/app/*
http://server.domain/app* - redirect to http://server/app/*
It has to work with mod_jk!
Edit: this is the final solution
` force use of host 'server'
RewriteCond %{HTTP_HOST} !^server$
RewriteRule ^(.*)$ server$1 [R,NE,L]
` prepend /app to URL if missing
RewriteCond %{request_uri} !^/app.*?
RewriteRule ^(.+?)$ app/$1 [R,NE,L]
Thanks to you, fahadsadah and Insanity5902!
I'm hesitant to flag either one of you as 'correct', as both have provided valuable input that made up the final solution.