Re: htaccess: .com and .net shall go to .de

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

 



RewriteCond %{HTTP_HOST} example\.com$ [OR]
RewriteCond %{HTTP_HOST} example\.net$
RewriteRule ^/$ www.example.de [blabla]

Or even in one line maybe
RewriteCond %{HTTP_HOST} example\.(com|net)
the rest is same

On Nov 9, 2011 8:56 AM, "Lukas C. C. Hempel" <lukas.hempel@xxxxxx> wrote:
yeah, but that would not forward www.example.com/test.php to www.example.de/test.php, does it?


Am 08.11.2011 um 22:54 schrieb Igor Cicimov:

Or you can use VirtualHost for example.de and put example.com and example.net as Alias...

On Nov 9, 2011 8:51 AM, "Igor Cicimov" <icicimov@xxxxxxxxx> wrote:

Are you using separate VirtualHost for each domain? If you are, and thats the way i would have done it,  then just redirect the root / of those two VirtualHost to example.de

On Nov 9, 2011 8:20 AM, "Lukas C. C. Hempel" <lukas.hempel@xxxxxx> wrote:
Hi there,

I have a problem with an htaccess file.

I own three domains: example.com, example.de and example.net. They all refer to the same webhosting space (= alias domains).

What I have succeeded in is that when I enter example.com or example.de it refers to www.example.de. I did that with that entry in the .htaccess file:

# Enforce www
RewriteCond %{HTTP_HOST} !^(www) [NC]
RewriteRule ^(.*)$ http://www.example.de/$1 [L,R=301]


What I want to add, is that when I enter www.example.com or www.example.net, I get forwarded to www.example.de? Can anyone come up with a code for that?


Thank you for your anticipated help.

Best regards,

Lukas

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[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