Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following problem:

The Apache DocumentRoot is /var/www/.

The URL of the file one should get when browsing is

So I configured a redirect via a RewriteRule:

RewriteRule ^$ _www/de/pub/aktuelles.cfm [R]

Now I don't want the "_www" directory to appear in the URL, but I don't want to rewrite it in every request.

People should see when they browse to

How do I achieve this, I thought of RewriteBase but that seems to be something different. But I guess I need some kind of base rule.

share|improve this question

marked as duplicate by kce, Ward, MadHatter, HBruijn, Ladadadada Jul 23 '14 at 12:49

This question was marked as an exact duplicate of an existing question.

To loose the _www from the URL simply alter your DocumentRoot to:

DocumentRoot /var/www/_www/

and the Rewrite Rule to match e.g.

RewriteRule ^/?$   /de/pub/aktuelles.cfm  [R]

If you have multiple language variants of the site you may want to look at using the Apache MultiViews facility.

share|improve this answer

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