Answer the question
In order to leave comments, you need to log in
How to bring the plug to mind?
There is a plug:
/.htaccess
RewriteEngine on
RewriteCond %{HTTPS}_%{HTTP_HOST} ^(?|off_(?:www\.)?(.*)|on_www\.(.*)) [NC]
RewriteRule .* https://%1/$0 [R=301,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{DOCUMENT_ROOT}/public/$0 !-f
RewriteCond %{DOCUMENT_ROOT}/public/$0 !-d
RewriteRule .* /public/index.php?$0 [L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule .* /public/$0 [L]
site/publiс/
, everything is fine, when you enter, site/public
as we see WITHOUT a slash, the address is appended and takes the following form site/public/?public
. RewriteRule .* /public/index.php?$0 [L]
to RewriteRule .* /public/index.php [L]
, the trouble with has ?public
disappeared, but now when you enter without a slash or with a slash, we always have site/publiс/
, that is, the last slash always appears. /site/public
, it does not apply to other addresses.
Answer the question
In order to leave comments, you need to log in
DirectorySlash off
RewriteEngine on
RewriteCond %{HTTPS}_%{HTTP_HOST} ^(?|off_(?:www\.)?(.*)|on_www\.(.*)) [NC]
RewriteRule .* https://%1/$0 [R=301,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{DOCUMENT_ROOT}/public/$0 !-f
RewriteCond %{DOCUMENT_ROOT}/public/$0 !-d
RewriteRule .* /public/index.php [L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule .* /public/$0 [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question