Cancel https redirection

Hi

When I ran certbot some times ago, I had a question to let me choose if I wanted any http access redirected to https. I answered yes and it worked fine.

Unfortunately I have forgotten that this prevents some specific application to work. For one sub-folder only, the access must not be redirected.

I suppose I must cancel the global redirection, and use htaccess files to redirect for other folders, as it was done previously, Unless there is a better solution, to deal with one exception.

Thanks for help

How can I cancel the global redirection, I don’t find how it was activated by certbot

My domain is: mrit.com

My web server is (include version):apache 2

The operating system my web server runs on is (include version):Linux ubuntu 16.04

I can login to a root shell on my machine (yes or no, or I don’t know):yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.28.0

Hi @tintinux

checking your site via https://check-your-website.server-daten.de/?q=mrit.com

Domainname Http-Status redirect Sec. G
http://mrit.com/
37.187.133.44 301 https://mrit.com/ 0.047 A
http://www.mrit.com/
37.187.133.44 301 https://www.mrit.com/ 0.043 A
https://mrit.com/
37.187.133.44 302 https://mrit.com//mrit.com/EN/ 5.690 B
https://www.mrit.com/
37.187.133.44 302 https://www.mrit.com//www.mrit.com/EN/ 5.357 B
https://mrit.com//mrit.com/EN/ 404 1.264 M
Not Found
https://www.mrit.com//www.mrit.com/EN/ 404 1.280 M

You have two (correct) redirects http + non-www -> https + non-www and http + www -> https + www.

Find your VirtualHosts / Port 80 with these domain names.

<VirtualHost *:80>
    DocumentRoot "/www/example1"
    ServerName www.example.com

    # Other directives here
</VirtualHost>

Important is the :80, that's port 80. There should be a Rewrite Rule, add comments # to block.

You may have one vHost with both names or two vHosts.

But what's the problem with the subfolder?

Then it should be excluded from the redirection.

Please show the redirection lines in uses.

Before I accepted (error is mine) that certbot redirect all http access to https, the redirections was done in htaccess. One folder is containing a script which must be accessed by old clients unable to deal with http. For this folder, its parents, and the root, there was nothing in htaccess to redirect and this has not changed.

The problem is that it looks like that certbot has changed something else to make a redirection at the root level, so it overrides what was existing before.

My question is simple : what has certbot changed when we answer yes to the redirection question. I remember that it is written that we can undo later, but how ?

Thanks

There should be lines included in the vhost configs with

# Managed by Certbot

[or something like that]

That handle the redirection.
Can you review the vhost config?

Hi
I have found it, at the end of the apache configuration.
Unfortunately, not after any reference to Certbot
Thanks for your answers

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.