我正在使用Redirect与我的服务器将所有http请求重定向到https。如果我只使用域,它的效果很好,但我也需要它来处理请求的URI。
例如,我http://streamworksaudio.com被重定向到https://streamworksaudio.com - 但http://streamworksaudio.com/contact-us/将重定向到https://streamworksaudio.comcontact-us/ - .com
之后没有尾随斜杠我有什么想法可以使用Redirect来做这件事吗?
以下是此虚拟主机的配置
<VirtualHost *:8080>
ServerName streamworksaudio.com
Redirect permanent / https://streamworksaudio.com/
ServerAlias streamworksaudio.com
DocumentRoot /var/www/vhosts/streamworksaudio.com
<Directory /var/www/vhosts/streamworksaudio.com>
Options FollowSymLinks
AllowOverride FileInfo Options
Order allow,deny
Allow from all
</Directory>
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
LogLevel info
ErrorLog /var/log/apache2/wordpress-error.log
CustomLog /var/log/apache2/wordpress-access.log combined
RewriteEngine On
RewriteLog /var/log/apache2/wordpress-rewrite.log
RewriteLogLevel 0
</VirtualHost>