.htaccess – Silverstripe splash

On 9 novembre 2018, in Sviluppo, WebServer, by admin

<IfModule mod_rewrite.c>

# Turn off index.php handling requests to the homepage fixes issue in apache >=2.4
<IfModule mod_dir.c>
DirectoryIndex disabled
</IfModule>

SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
RewriteBase '/'

### REDIRECT WWW DA DECOMMENTARE NON APPENA PRESENTE REIDRECT 2017
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

#RewriteCond %{REQUEST_URI} ^/$
#RewriteRule .* splash/index.html [L]

#RewriteCond %{REQUEST_URI} ^/home$
#RewriteRule .* framework/main.php?url=/ [L]

# Deny access to potentially sensitive files and folders
RewriteRule ^vendor(/|$) - [F,L,NC]
RewriteRule silverstripe-cache(/|$) - [F,L,NC]
RewriteRule composer\.(json|lock) - [F,L,NC]

# Process through SilverStripe if no file with the requested name exists.
# Pass through the original path as a query parameter, and retain the existing parameters.
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* framework/main.php?url=%1 [QSA]
</IfModule>