我正在使用启用了模式历史记录的 vuejs,在文档中我找到了这个 Histoy 模式文档
但是然后使用带有 certbot 的 Let's Encrypt 我运行一个命令来生成 ssl 证书,但现在由于重定向,以下配置不再有效。
<VirtualHost *:80>
ServerName virtuafest.vir.mx
ServerAdmin webmaster@localhost
DocumentRoot /var/www/virtuafest17/dist
<Directory /var/www/virtuafest17/dist>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
</Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =virtuafest.vir.mx
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
如何在不必为重写会议创建 .htaccess 文件的情况下解决此问题?
在etc/apache2/apache2-le-ssl.conf
中找到VirtualHost: *:443
并在那里添加您的mod_rewrite
。