Apache URL RewriteCond / RewriteRule question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

My name is Mirko and I have a problem with our RewriteRules.

What I want:

Visitor type the URL www.linart.de
And we forward him to www.linuxart.de/en

That works!

Visitor type the URL www.linart.de/en
And we forward him to www.linuxart.de/en

That works!

Visitor type the URL www.linuxart.de/page1
And we forward him to www.linuxart.de/en/page1

And that's the pain - I have no idear how we can solve that?! What I produce in my example below produce and endless loop of redirections.

And idear?
Any help would be great!


# -------------- 
RewriteCond %{HTTP_HOST} ^(www\.)?linart\.de$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/$ http://www.linuxart.de/en/               [R=307,NC,L]

RewriteCond %{HTTP_HOST} ^(www\.)?linart\.de$       
RewriteCond %{REQUEST_URI} ^/en$
RewriteRule ^/en$ http://www.linuxart.de/en/             [R=307,NC,L]

#RewriteCond %{HTTP_HOST} ^(www\.)?linart\.de$        
#RewriteCond %{REQUEST_URI} ^/en/.+$
#RewriteRule ^/en/(.*)$ http://www.linuxart.de/en/$1      [R=307,NC,L]
# -------------- 




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux