All posts by skow

htaccess – redirect problems with domain root and subdirectories

I have a domain and like to redirect only the startpage to

All the other subdirectories of (,, etc) should be redirected to, ...

I like to do this with a htaccess.

My tests didn't work:

RewriteCond %{REQUEST_URI} (.*)
RewriteRule ^(.*)$$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^(www\.)?old_domain\.de [NC]
RewriteRule ^(.*)$ [R=301,L] 

Can anyone give me insights in how I get this work? I am a new in using a htaccess.

Thank you.