GCI_SUPPORT
asked on
ssl and website
i have a website at www.mywebsite.com. i have created a sub domain for my customer to access informations
at secure.mywebsite.com.
i want my user to be able to just use
https://secure.mywebsite.com
there is a way to redirect someone that goes to http://secure.mywebsite.com
at secure.mywebsite.com.
i want my user to be able to just use
https://secure.mywebsite.com
there is a way to redirect someone that goes to http://secure.mywebsite.com
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Do you have a separate vhost for :443?
The below config should work for :80 in either case.
The below config should work for :80 in either case.
<VirtualHost *:80>
ServerAdmin webmaster@gcilogistics.net
ServerName secure.gcilogistics.net
# we redirect anything here to https://
RewriteEngine On
RewriteRule ^(.*) https://secure.gcilogistics.net$1 [R=301]
</VirtualHost>
<VirtualHost secure.gcilogistics.net:443>
ServerAdmin webmaster@gcilogistics.net
ServerName secure.gcilogistics.net
# All other config goes here
ErrorLog "logs/gcionlineservices.gcilogistics.net-error.log"
CustomLog "logs/gcionlineservices.gcilogistics.net-access.log" common
<Directory C:/WWW/GCISECURE/GCISECURE_WEB/>
Order allow,deny
Allow from all
AddType text/cache-manifest .manifest
</Directory>
<Files GCISECURE>
ForceType application/WebDev16-awp
Allow from all
</Files>
Alias /GCISECURE_WEB/ "C:/WWW/GCISECURE/GCISECURE_WEB/"
# SSL settings here
# ...
</VirtualHost>
Go to the secure sub directory and create a .htaccess with the following contents.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
ASKER
<VirtualHost *:80>
ServerAdmin webmaster@gcilogistics.net
DocumentRoot "C:/WWW/GCISECURE/GCISECUR
ServerName secure.gcilogistics.net
ErrorLog "logs/gcionlineservices.gc
CustomLog "logs/gcionlineservices.gc
<Directory C:/WWW/GCISECURE/GCISECURE
Order allow,deny
Allow from all
AddType text/cache-manifest .manifest
</Directory>
<Files GCISECURE>
ForceType application/WebDev16-awp
Allow from all
</Files>
Alias /GCISECURE_WEB/ "C:/WWW/GCISECURE/GCISECUR
</VirtualHost>
how do i have to change it