# Security - Block access to entire application
Order allow,deny
Deny from all
Order allow,deny
Deny from all
# Block access to all application files
Require all denied
# Directory protection - Block all access
Order allow,deny
Deny from all
# Only allow access to public directory
Order allow,deny
Allow from all
Require all granted
# Set default directory to public
DirectoryIndex public/index.php
# Redirect root to public directory
RewriteEngine On
RewriteBase /
# Redirect root to public
RewriteRule ^$ public/ [L]
# Redirect all other requests to public
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ public/$1 [L]