我尝试使用apache重定向没有.htacces http连接到https:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
Redirect "/" "https://test.mywebsite.com/"
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
但是在我尝试访问例如https://test.mywebsite.com/affilate之后这样做了,我在我的.htaccess里面得到了404:
RewriteRule ^affilate$ affilate.php
此外,如果我尝试https://test.mywebsite.com/affilate.php,它的工作原理......还有关于重定向的内容