LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Configuring Automatic Redirects from port 80 to port 443 with bundled Apache server (https://www.linuxquestions.org/questions/fedora-35/configuring-automatic-redirects-from-port-80-to-port-443-with-bundled-apache-server-609598/)

kaplan71 12-28-2007 08:12 AM

Configuring Automatic Redirects from port 80 to port 443 with bundled Apache server
 
Hi there --

We have a system running Fedora Core 7 with the bundled Apache server. I would like to have connections made to port 80 (http) be automatically redirected to port 443 (https). What is the best way to accomplish this? Thanks.

brianmcgee 12-28-2007 08:30 AM

You may use the rewrite engine for that:

Code:

RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule (.*) https://your.website.example.com/ [R]



All times are GMT -5. The time now is 09:03 AM.