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
Apache Web Server

Avatar of undefined
Last Comment
paries

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Blaz

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
paries

ASKER
perfect, just what i was looking for
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23