diff --git a/public/.htaccess b/public/.htaccess index e90dff92a..a214205df 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,4 +1,38 @@ RewriteEngine On + +# To redirect a subdomain to a subdir because of https not supporting wildcards +# replace values between <> with your ones +# RewriteCond %{HTTP_HOST} ^\.\.com$ [OR] +# RewriteCond %{HTTP_HOST} ^www\.\.\.com$ +# RewriteRule ^/?$ "https\:\/\/www\.\.com\/" [R=301,L] + +# To rewrite "domain.com -> www.domain.com" uncomment the following lines. +# RewriteCond %{HTTPS} !=on +# RewriteCond %{HTTP_HOST} !^www\..+$ [NC] +# RewriteCond %{HTTP_HOST} (.+)$ [NC] +# RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L] + RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^(.*)$ index.php/$1 [L] +# if in web root +RewriteRule ^(.*)$ index.php?/$1 [L] +# if in subdir comment above line, uncomment below one and replace with your path +# RewriteRule ^(.*)$ //public/index.php?/$1 [L] + +# disable directory browsing +# For security reasons, Option all cannot be overridden. +#Options All -Indexes +Options +ExecCGI +Includes +IncludesNOEXEC +SymLinksIfOwnerMatch -Indexes + +# secure htaccess file + + Order allow,deny + Deny from all + + + + + ExpiresActive On + ExpiresDefault "access plus 1 week" + + \ No newline at end of file