Link to home
Start Free TrialLog in
Avatar of paries
paries

asked on

need help finishing this RewriteRule

hello,
currently i have this
   RewriteEngine On
   RewriteCond %{HTTP_HOST} ^public.mydomain.com$ [NC]
   RewriteRule ^(.*)$ http://www.mydomain.com/servlet/publicPageServlet?page=$1 [R=301,L]

so when i do
http://public.mydomain.com/kam
it rewrites it to
http://ww.mydomain.com/servlet/publicPageServlet?page=/kam

so this kind of works.
there is a couple of things i would like to change if possible.

currently the user see's the new URL. Is there a way to not show the New URL ?
secondly is there a way to strip the / before kam. I can do it in the servlet but was wondering if there is a way to do it before.
last, if they just put in
http://public.mydomain.com/
i redirect I goto http://www.mydomain.com/

Thanks for the help
ASKER CERTIFIED SOLUTION
Avatar of Blaz
Blaz
Flag of Slovenia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of paries
paries

ASKER

perfect, just what i was looking for