Discussion:
[Zope3-Users] Redirect domain.com to www.domain.com
christophe petit
2011-04-20 05:09:33 UTC
Permalink
Hello,

I have just installed zope 3 and I would like to know how to make redirect
the url "http://domain.com" to "http://www.domain.com".
I have not installed apache in front of zope 3, I used prerouting iptables
rule to forward port 80 to zope 3 HTTPPORT.

Can i dot this without Apache and its "RewriteRule" in .htaccess ?

Any help would be appreciated,

Thanks.
Andreas Jung
2011-04-20 05:22:26 UTC
Permalink
Post by christophe petit
Hello,
I have just installed zope 3 and I would like to know how to make
redirect the url "http://domain.com" to "http://www.domain.com".
I have not installed apache in front of zope 3, I used prerouting
iptables rule to forward port 80 to zope 3 HTTPPORT.
Can i dot this without Apache and its "RewriteRule" in .htaccess ?
Any help would be appreciated,
Running Zope on a public network behind a reverse is highly recommended
and best-practice...so the answer would be: use rewrite rules..

- -aj
christophe petit
2011-04-20 05:48:15 UTC
Permalink
So even Twisted framework doesn't allow to to this ?

Thanks.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by christophe petit
Hello,
I have just installed zope 3 and I would like to know how to make
redirect the url "http://domain.com" to "http://www.domain.com".
I have not installed apache in front of zope 3, I used prerouting
iptables rule to forward port 80 to zope 3 HTTPPORT.
Can i dot this without Apache and its "RewriteRule" in .htaccess ?
Any help would be appreciated,
Running Zope on a public network behind a reverse is highly recommended
and best-practice...so the answer would be: use rewrite rules..
- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQGUBAEBAgAGBQJNrm2SAAoJEADcfz7u4AZj6BsLvj8J+v6z15OFDSGCn8jOIALc
NeR/t2t8CpgX5ly7sbIs8VzrkfXCLQit+8Rxup7K6l7V6h8IFJP8w58ffphqNfWn
0GJagriExDqKgMoHYmzLacDcUeCdLpujPmRKkZlcyFtnL16FBT0bXbFy/MTqvFrv
LV1yJAEV3Wwix7ByGhipt5LK2qmORpbrUY/3L0eNgRDJeuW+VUgCQS3HRDVpG+aJ
HggkieeYhdEEE4aZzRSxx03GlBiVfHsA0dFiKVzISNtUn8vL8m/AsqySiKZvZ+6Q
tzaXxShMvK6UEOkjIJc2qxfBAdoFOS/gfVRLoMnglNF3K1sdO/oUiVhKFUiQfmEU
58rkDLc8BgznKf5LkzboBhAQhv0wQcIYzf7gLn9KAUxIM/NSdXzBL0tgIpi3awkI
eRjHQrmwfYHo0kY3x1OmEcXOEHw/pKa1G0BgBOBKXDtCSfi9Udbvq6QXqUVDrbXX
xeKNsOiwlW89iCcZk7b3HuLAjh8nW/A=
=UQYF
-----END PGP SIGNATURE-----
Richard Watson
2011-04-20 08:17:48 UTC
Permalink
----- Original Message -----
Post by christophe petit
So even Twisted framework doesn't allow to to this ?
Thanks.
Of course there's nothing stopping you returning any HTTP header you want, however I'm not sure if Zope3 even knows which domain you're using to call it. If it does you'd just need to search for the lack of www in that before sending something back, but much easier to use Apache/Nginx.
Loading...