skip to Main Content

I want to disable https from a single link, forcing it to http.

https://tipografiasartore.it/autodiscover/autodiscover.xml

I added this string to my .htaccess file but it ain’t working:

RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule ^autodiscover/autodiscover.xml http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

My .htaccess so far:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/[0-9a-zA-Z_-]+$
    RewriteCond %{REQUEST_URI} !^/.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
    RewriteCond %{REQUEST_URI} !^/.well-known/pki-validation/[A-F0-9]{32}.txt(?: Comodo DCV)?$
    RewriteRule . /index.php [L]
    </IfModule>
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule ^autodiscover/autodiscover.xml http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

2

Answers


  1. You can use the following Rule to redirect https://tipografiasartore.it/autodiscover/autodiscover.xml to its http version

    RewriteEngine on
    
    RewriteCond %{HTTPS} on
    RewriteRule ^autodiscover/autodiscover.xml http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    Login or Signup to reply.
  2. I would suggest you to try this code. Surely it will going to work.

    RewriteEngine On
    RewriteCond %{HTTPS} on
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search