Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've been trying to find specific information on the problem, but it all seems rather confusing or irrelevant.

I have an Apache install with several subfolders with different websites. I need requests for to redirect to .../htdocs/foo.

I'm trying to avoid the web address appearing in the browser as, instead appearing as

Is this possible?

share|improve this question
If I can give you a suggestion, unless you want to learn, you can get this done in 1 minute with a cPanel shared hosting by clicking a button called "add Addon domain". It will cost you not more than 50 bucks per year. It's worth the time you would waste setting up your own Apache config and it will for sure run in a more scure environment. – Marco Demaio Feb 26 '11 at 18:02

1 Answer 1

up vote 0 down vote accepted

This is done in the httpd.conf file not with .htaccess, here are some examples:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.