RE: Redirection via HTTPS

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

 



>Hello.

I> have a question about 301 redirection of https.

>My website is accessible with both of >non-subdomain http(s)://mydomain.com and >subdomain-www http(s)://www.mydomain.com. >Both have the same IP address.
I> would like to change https://mydomain.com/ to >redirection for https://www.mydomain.com/.
>To change for redirecting all web contents under >mydomain.com 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 (.*) https://www.mydomain.com$1 >[R=301]
></IfModule>

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

http://httpd.apache.org/docs/2.4/rewrite/avoid.html

[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