D
D
Dim Boy2018-04-09 15:16:21
Apache HTTP Server
Dim Boy, 2018-04-09 15:16:21

Why does htaccess double slash at the end?

Why, with such settings, comes to the site with the following address https://www.site.com//

<VirtualHost *:80>
ServerName www.site.com
ServerAlias site.com
ServerAdmin [email protected]
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.site.com/$1 [L,R=301]
</VirtualHost>

<VirtualHost *:443>
DocumentRoot "/home/www/site.com"
ServerName www.site.com
ServerAlias www.site.com
ServerAdmin [email protected]
<Directory "/home/www/site.com">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/www/site.log
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/site.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/site.com/privkey.pem
</VirtualHost>

The .htaccess file itself in the site directory:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question