[nycphp-talk] Canonical hostname help
Ajai Khattri
ajai at bitblit.net
Wed Dec 5 17:26:12 EST 2007
On Wed, 5 Dec 2007, John Campbell wrote:
> This should work:
>
> RewriteEngine on
>
> RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
> RewriteCond %{HTTP_HOST} !^$
> RewriteCond %{SERVER_PORT} !^443$
> RewriteRule ^/(.*)$ http://www.example.com/$1 [R=301,L]
>
> RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
> RewriteCond %{HTTP_HOST} !^$
> RewriteCond %{SERVER_PORT} ^443$
> RewriteRule ^/(.*)$ https://www.example.com/$1 [R=301,L]
Shouldn't the first rule use port 80 instead of 443?
--
Aj.
More information about the talk
mailing list