Re: [SLUG] one entity with two tld domains web setup?

2011-10-11 Thread Amos Shapira
On 6 October 2011 15:46, Voytek Eymont  wrote:

>
> > + Redirect, or use one VirtualHost + mod_rewrite.
>
> > I'm assuming Apache? If so, two main ways to do it: use two VirtualHosts
> yes, Apache, thanks for the code
>
> any extra overhead penalty for either method ? (mind you, this is a
> brochure site with low usage, so it won't make much difference)
>
> I think I'll stick with redirect, that what was used in the other sites
>

There is a slight overhead when doing client-side redirect since the browser
will have to do another http request when it received the initial redirect,
but that's most probably negligible and worth the trouble that the client
will (hopefully) bookmark the "canonical" domain name.

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] one entity with two tld domains web setup?

2011-10-05 Thread Voytek Eymont
thanks, Chris, Peter, Stewart, Jeremy

On Thu, October 6, 2011 8:18 am, Jeremy Visser wrote:

> Your hunch is correct — there should be one canonical location for your
> website. All auxiliary domains should redirect to the main one.

sorry, I think I wasn't really clear in what I was asking, the answer
above is what I was seeking, thanks

> I'm assuming Apache? If so, two main ways to do it: use two VirtualHosts
> + Redirect, or use one VirtualHost + mod_rewrite.

yes, Apache, thanks for the code

any extra overhead penalty for either method ? (mind you, this is a
brochure site with low usage, so it won't make much difference)

I think I'll stick with redirect, that what was used in the other sites

thanks again

-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] one entity with two tld domains web setup?

2011-10-05 Thread Jeremy Visser
On 05/10/2011, at 14:28, Voytek Eymont wrote:
> www.name.com is the web host, so, do I set a www.name.com.au host with
> permanent redirect ? or how ? (I used in the past httpd directive to point
> both hosts at same http/path/to/index.html, though I'm not sure that is a
> good idea ?)

Your hunch is correct — there should be one canonical location for your 
website. All auxiliary domains should redirect to the main one.

I'm assuming Apache? If so, two main ways to do it: use two VirtualHosts + 
Redirect, or use one VirtualHost + mod_rewrite.

Example #1:

NameVirtualHost *

ServerName  name.com
ServerAlias www.name.com
DocumentRoot/var/www/name.com


ServerName  name.com.au
ServerAlias www.name.com.au
RedirectPermanent   /   http://name.com/


Example #2:


ServerName  name.com
ServerAlias www.name.com name.com.au www.name.com.au
DocumentRoot/var/www/name.com

RewriteEngine   On
RewriteCond %{HTTP_HOST}!^name\.com$[NC]
RewriteCond %{HTTP_HOST}!=""
RewriteRule ^/(.*)  http://name.com/$1  [L,R=301]





PGP.sig
Description: This is a digitally signed message part
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: [SLUG] one entity with two tld domains web setup?

2011-10-04 Thread peter
> "Chris" == Chris Barnes  writes:

Chris> At the DNS level point the www 'A' record on both domains to
Chris> the same ip address where the web server is hosted.  or make
Chris> the www record for name.com.au a 'cname' record and point it to
Chris> the www record for name.com

This only works if hes not using name-based virtual hosting.

I'd add a redirect in the .com.au version of the website.
 Peter C
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] one entity with two tld domains web setup?

2011-10-04 Thread Chris Barnes
At the DNS level point the www 'A' record on both domains to the same ip
address where the web server is hosted.
or make the www record for name.com.au a 'cname' record and point it to the
www record for name.com

e.g.
www.name.com -> 111.222.333.444
www.name.com.au -> www.name.com


Does that help?


On Wed, Oct 5, 2011 at 2:28 PM, Voytek Eymont  wrote:

> I need to set up a web host for one entity that has same domain name in
> .com as well as .com.au, .com is meant to be the real one, .com.au is to
> prevent cyber squaters, what is the best way to set up web host?
>
> www.name.com is the web host, so, do I set a www.name.com.au host with
> permanent redirect ? or how ? (I used in the past httpd directive to point
> both hosts at same http/path/to/index.html, though I'm not sure that is a
> good idea ?)
>
>
>
> --
> Voytek
>
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>



-- 
Kind Regards,

Christopher Barnes

e. chris.p.bar...@gmail.com
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] one entity with two tld domains web setup?

2011-10-04 Thread Voytek Eymont
I need to set up a web host for one entity that has same domain name in
.com as well as .com.au, .com is meant to be the real one, .com.au is to
prevent cyber squaters, what is the best way to set up web host?

www.name.com is the web host, so, do I set a www.name.com.au host with
permanent redirect ? or how ? (I used in the past httpd directive to point
both hosts at same http/path/to/index.html, though I'm not sure that is a
good idea ?)



-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html