PHP_SMART_HOME_V3/.htaccess
2020-04-23 21:13:02 +02:00

16 lines
413 B
ApacheConf

RewriteEngine On
# require https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# serve all files from public subfolder
RewriteCond %{REQUEST_FILENAME} !.php
RewriteCond %{REQUEST_FILENAME} \.
RewriteRule (.*) ./public/$1 [L]
# serve all other request as query parameters
RewriteRule (.*) ./public/index.php?url=$1 [L,QSA]
AddType application/x-httpd-php .php .phtml