Questions tagged «mod-alias»

3
apache2.4 mod_rewrite排除特定别名directroy / uri
我在一个虚拟主机上进行了以下设置: ...<VirtualHost *:80> ServerName cloud.domain.de ServerAdmin webmaster@domain.de ServerSignature Off Alias "/.well-known/acme-challenge" "/var/www/domain.de/vh-www/htdocs/public/.well-known/acme-challenge" <Directory "/var/www/domain.de/vh-www/htdocs/public/.well-known/acme-challenge"> Require all granted ForceType 'text/plain' </Directory> <ifmodule mod_rewrite.c> RewriteEngine On RewriteCond %(REQUEST_URI) !/\.well\-known/acme\-challenge/?.* RewriteCond %{HTTPS} off # RewriteRule ^\.well-known/acme-challenge/([A-Za-z0-9-]+)/?$ - [L] RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] </ifmodule>... 我要实现的是,http://cloud.domain.de/.well-known/acme-challenge/访问URL时,mod_rewrite不会重写URL 。 我已经尝试了不同的方法,其中一种是上面已注释掉的RewriteRule,但似乎没有任何效果:服务器每次都将其重写为https。 当出于测试目的而禁用重写时,可以很好地访问别名URL。 如何实现特定的URL不被重写?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.