K
K
kredisov2020-06-08 11:43:10
htaccess
kredisov, 2020-06-08 11:43:10

Exception in htaccess doesn't work, why?

There is such a url
http://site-name/well-known/pki-validation/robots.txt

In my htaccess file I have the following line (exception)
RewriteCond %{REQUEST_URI} !^/well-known/pki-validation/ .*

Next comes the transformation rule, which, without taking into account the above exception, transforms my
RewriteRule ^([^/]+)/([^/]+)/([^/]+) /?lang=$1&get=$2&ir =$3

What did I do wrong? How to leave both the exception working and the rule for other calls?
Thank you very much

P.S. the final folder will contain *.txt files, so I need a working rule for any such files inside

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-06-11
@shambler81

1. the entire file to the studio
2. /well-known/pki-validation/ in general, it’s good to take it out to Apache or nginx so that the site has nothing to do with these files at all.
3. what is your configuration at once not nginx + apache ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question