【发布时间】:2022-01-09 22:43:51
【问题描述】:
我的问题是在特定文件夹中重定向:
首先:所有http://myDomain.de 必须更改为https://myDomain.de ...这不是问题 当电话是:https://myDomain.de/kd 我可以重定向到https://myDomain.de/kd/ ..这是工作
我的问题是:
当我打电话时:https://myDomain.de 我不会重定向到文件夹 https://myDomain.de/sub1(这是我的 wordpress 文件...)
这是我的代码:
<VirtualHost *:80>
Redirect permanent /kd https://myDomain.de/kd/
Redirect permanent / https://myDomain.de/sub1/
</VirtualHost>
<VirtualHost _default_:443>
ServerAdmin masterddgdgg@gmx.de
ServerName myDomain.de
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/myDomain.de-error.log
CustomLog ${APACHE_LOG_DIR}/myDomain.de-access.log combined
<IfModule mod_ssl.c>
SSLCertificateFile /etc/letsencrypt/live/myDomain.de-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/myDomain.de-0001/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</IfModule>
</VirtualHost>
<Directory "/var/www/html">
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
【问题讨论】:
标签: redirect ssl-certificate virtualhost