Running Apache 2.4.7 (Ubuntu 14.04) with vhosts and letsencrypt certs. Many vhosts run WordPress which creates a .htaccess
file. I had excluded the .well-known
folder in a few of these .htaccess
files but updates to WordPress or plugins regularly wipe these manual modifications.
It would be nicer to turn RewriteEngine off
for this folder under each vhost, but this is proving difficult as doing so under the
directive isn't supported. From what I'm seeing, the
directive has to be specific rather than relative?
What are my options? Given that I'm on Apache 2.4.7 I can live with adding RewriteOptions Inherit
to each vhost config. But would like to avoid adding bespoke config to each vhost.
, но обновления WordPress или плагинов регулярно стирают эти ручные изменения.
Обновления WordPress должны обновлять только код в пределах # BEGIN WordPress
(или подобных) маркеров комментариев. Хотя возможно, что некоторые плагины плохо работают.
директива
должна быть конкретной, а не относительной?
В то время как директива
отображает в абсолютный путь файловой системы, вы можете указать основные символы подстановки для сегментов пути (?
, *
и диапазоны символов []
). Или, при желании, используйте полное регулярное выражение (с добавлением символа ~
). Например:
<Directory ~ "\.well-known$">
Ссылка:
https://httpd.apache.org/docs/current/mod/core.html#directory