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.
abc.com-le-ssl.conf file
```
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@abc.com
ServerName abc.com
ServerAlias www.abc.com
DocumentRoot /var/www/html/abc.com/public
<Directory /var/www/html/abc.com/public/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/abc.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/abc.com/privkey.pem
</VirtualHost>
</IfModule>
```
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:
Not
<VirtualHost *:443>
instead something like
<VirtualHost *:80>
rg305
5
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
)
1 Like
system
Closed
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.