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

Let's say I have my web folder as public_html. In there I have a sub folder. I can view the folder at: &

What I want is:

This will show the content of public_html/sub. How would I set up my rewrite rules to do this.

share|improve this question
This seems like a duplicate of this:… - useful info available there. FWIW, my suggestion is you create another virtual host pointing directly to the sub-folder rather than incur the overhead of the apache rewrites. – Zayne S Halsall Feb 5 '11 at 12:41

1 Answer 1

You don't need any rewrite rules. Just add a VirtualHost section, like

<VirtualHost IPAddress>
    DocumentRoot /path/to/public_html/sub
share|improve this answer

Your Answer


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