【发布时间】:2018-02-28 11:46:13
【问题描述】:
我正在尝试跨 aws 弹性负载均衡器将我的整个域从 http 重定向到 https。
我的 urlrewrite.conf (Apache/2.2.15)
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} ^http$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} !^on$
RewriteCond %{REQUEST_URI} ^/testdemo/
RewriteRule ^/(.*) /web/testcontroller?url=$1 [PT]
以上规则是将主页从http重定向到https。但是进入testdemo虚拟目录后得到文件“404 Not Found”
谁能告诉我这是什么问题。
【问题讨论】:
标签: apache .htaccess url-rewriting http-status-code-404 httpd.conf