我们的一个客户端站点使用nginx apache . 很多事情都在nginx方面进行,有些在apache方面进行 .
只有少数几个地点设置为使用SSL . 重定向到https在nginx上设置,并从https重定向到http - 在apache上 .
具有模式的网址可以轻松重定向到https .
例如:每个带有信息文本的网址都可以重定向到https . 如下 .
http://www.example.com/info/111
http://www.example.com/info/222
在example.com.conf文件中
location /info/ {
return 301 https://$host$request_uri;
}
在example.com-ssl.conf文件中
location /info {
# Proxy params
try_files $uri $uri/ @proxy;
proxy_intercept_errors on;
proxy_pass https://ex-ssl;
proxy_redirect http:// https://;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
重写.htaccess上的信息页面配置,如下所示
RewriteRule ^info/([^/\.]+)$ info.php?page=$1
问题是还有另外1000个网址应该重定向到https,而不显示任何带网址的模式 . 如下所示,让我们说AAA和BBB两个面包车配置文件
http://www.example.com/aaa
http://www.example.com/bbb
我想将这1000个网址仅重定向到https,在httpscess van url重写如下,为van详细信息页面 .
RewriteRule ^([^/\.]+)$ van.php?vanurl=$1
你能帮忙吗?这样做的任何可能性?