: Redirect HTTPS request to HTTP in Apache Can an HTTPS request be redirected to an HTTP request in Apache? If so, how?
Can an HTTPS request be redirected to an HTTP request in Apache? If so, how?
More posts by @Courtney195
1 Comments
Sorted by latest first Latest Oldest Best
Yes it can, and you'll want to use an Apache htaccess file to rewrite the request. It will need to be configured in your VHost config if you are using one so that you can match on the port, as Apache doesn't know what https is in htaccess.
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ example.com/ [L,R=301]
This should redirect anything incoming on https to the matching page on http
Oh yes, I should mention that this will need to be in your .htaccess file in the root of your website, or in the folder you want to redirect. You'll also need to ensure that in your httpd.conf or vhost.conf (depending on config) that you have AllowOverride configured, otherwise your htaccess will not be read.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.