I have tried to install silverstripe 4.2.1 on two different servers and am getting the same error on install.. I have multiple installations this year on other client machines but this is the first time I have run into this problem. Wondering if it is a 4.2.1 problem
The error message on installation
Friendly URLs are not working. This is most likely because a rewrite module isn't configured correctly on your site. You may need to get your web host or server administrator to do this for you:
mod_rewrite or other rewrite module is enabled on your web server
AllowOverride All is set for the directory where SilverStripe is installed
I have placed some garbage text in .htaccess at root, in public_html and in the silverstripe public folder. All three cause a 500 error.
Note that i was able to visit site.com and it redirected to the installer. so I would think that mod_rewrite is indeed enabled.
When I visit site.com it gives the silverstripe version of "Server Error"
My HTAccess file located in the public folder of SS:
### SILVERSTRIPE START ###
# Deny access to templates (but allow from localhost)
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>
# Deny access to IIS configuration
<Files web.config>
Order deny,allow
Deny from all
</Files>
# Deny access to YAML configuration files which might include sensitive information
<Files ~ "\.ya?ml$">
Order allow,deny
Deny from all
</Files>
# Route errors to static pages automatically generated by SilverStripe
ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html
<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
DirectorySlash On
</IfModule>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
RewriteBase '/public'
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Deny access to potentially sensitive files and folders
RewriteRule ^vendor(/|$) - [F,L,NC]
RewriteRule ^\.env - [F,L,NC]
RewriteRule silverstripe-cache(/|$) - [F,L,NC]
RewriteRule composer\.(json|lock) - [F,L,NC]
RewriteRule (error|silverstripe|debug)\.log - [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.
# Try finding framework in the vendor folder first
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
</IfModule>
### SILVERSTRIPE END ###
And the one in public_html
RewriteEngine On
RewriteRule ^(.*)$ public/$1
I am running PHP7.1 on a shared server.