httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Arnold <>
Subject RE: [users@httpd] Redirection via HTTPS
Date Sun, 08 Feb 2015 03:42:56 GMT

I> have a question about 301 redirection of https.

>My website is accessible with both of >non-subdomain http(s)://<>
and >subdomain-www http(s)://<>. >Both
have the same IP address.
I> would like to change to >redirection for
>To change for redirecting all web contents under ><>
including user directory /~user and >so on, I tried to add the following to /etc/apache2/mods-available/ssl.conf
or /etc/apache2/sites-available/default-ssl.conf.

><IfModule mod_rewrite.c>
 >       RewriteEngine On
  >      RewriteCond %{HTTP_HOST} >^(mydomain\.com)(:443)?
 >       RewriteRule (.*)<>$1 >[R=301]

What does your log say? I am trying to much the same but with a redirect instead of a rewrite
and found this helpful:

View raw message