0

I have configuration like this.

I want /.well-known/acme-challenge/ to work without redirect, but everything else to go to https:// example.com

Already tried with but it also does not work.

<VirtualHost _default_> ServerName example.com Alias /.well-known/acme-challenge/ /letsencrypt/.well-known/acme-challenge/ Redirect / https://example.com/ </VirtualHost> 
1
  • 1
    You could re-write only if the requested file doesn't exist... and leave the letsencrypt stuff as the only files that do exist. stackoverflow.com/questions/595005/… Commented May 31, 2019 at 12:31

1 Answer 1

0

This can be done with RewriteEngine:

<VirtualHost _default_> ServerName example.com Alias /.well-known/acme-challenge/ /letsencrypt/.well-known/acme-challenge/ RewriteEngine On RewriteCond %{REQUEST_URI} !^/.well-known/ RewriteRule /(.*) https://example.com/$1 [R,L] </VirtualHost> 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.