[MS4W-Users] redirecting http traffic to https
Mark Volz
MarkVolz at co.lyon.mn.us
Fri Mar 23 17:01:05 EDT 2018
Hello,
What do I need to do to redirect traffic from http:// to https:// in Apache for both the htdocs folder and all of my ms4w applications?
Background:
I am having trouble setting up my application to automatically redirect traffic from http:// to https:// using the built in Apache web server. Thus far I have been able to enable https:// on my server and my apps work in https. However, I am struggling to find the best way to automatically redirect http:// traffic to https://. It seems like there are several ways to redirect traffic including using virtual hosts and .htaccess files. One site recommended editing the ms4w\Apache\conf\httpd.conf file and adding a redirect statement. The redirect worked for directing //http: traffic to https:// for files that are in the Apache/htdocs folder. However, it did not work to redirect any of the traffic for my ms4w applications.
Example of redirection added around line 347 in httpd.conf.
<IfModule alias_module>
...
#Added line below
Redirect permanent / https://mysite.com
Thank You!
Sincerely,
Mark Volz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ms4w.com/pipermail/ms4w-users/attachments/20180323/3f4a3dd8/attachment.html>
More information about the MS4W-Users
mailing list