How to remove Force SSL redirect?


I want to remove force ssl redirect without .htaccess.

I added SSL encriypt via Let’s Encrypt(Free) in digitialocean, and I must use http format for some route. file

<IfModule mod_ssl.c>
<VirtualHost *:443>
        DocumentRoot /var/www/html/
    <Directory /var/www/html/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/


Hi @alibaraneser

you have to find your current redirect.

But this may be defined in your http block (port 80), not in your https - block.

Or it is defined in your .htaccess.


Couldn’t find the place where defined http to https

Options -MultiViews

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]


There should be a port - 80 - block:


<VirtualHost *:443>

instead something like

<VirtualHost *:80>


Try these:
grep -Eri 'rewrite|return' /etc/apache2
grep -Eri 'rewrite|return' /etc/httpd


I guess you meant:

grep -Eri 'rewrite|redirect' /etc/apache2
grep -Eri 'rewrite|redirect' /etc/httpd

(return is nginx :stuck_out_tongue: )