<IfModule mod_rewrite.c> RewriteEngine On Options +FollowSymlinks Options +SymLinksIfOwnerMatch RewriteBase / RewriteCond %{HTTPS} =on RewriteRule ^ - [env=proto:https] RewriteCond %{HTTPS} !=on RewriteRule ^ - [env=proto:http] # Перенаправляем все запросы на public/index.php RewriteCond %{REQUEST_URI} !^public RewriteRule ^(.*)$ public/$1 [L] </IfModule> # Запрещаем доступ к файлу .htaccess <Files .htaccess> order allow,deny deny from all </Files>