troubleshooting Question

need help finishing this RewriteRule

Avatar of paries
paries asked on
Apache Web Server
2 Comments1 Solution239 ViewsLast Modified:
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
Blaz

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros