0

I have the following problem:

The Apache DocumentRoot is /var/www/.

The URL of the file one should get when browsing http://www.example.com/ is http://www.example.com/_www/en/home.html

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 http://www.example.com/en/home.html when they browse to http://www.example.com/

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.

JohnnyFromBF
  • 1,239
  • 6
  • 21
  • 25

1 Answers1

0

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.

arober11
  • 417
  • 3
  • 6