Thank You for Your answers.
@FrankenBunt ,
Yes, I tried to install using composer, got same problem.
@ntd
This is shared server and my hosting provider wrote “The Web server in MyDevil drives the efficient NGiNX. Additional modules enable using the “standard” .htaccess available so far only in inefficient Apache. It is possible to easily edit rewrite rules or autoindex templates”. Unfortunately my kung-fu is not strong enough and I don’t know exactly how to check it .
My clear installation is located on http://ssproblem.suriq.usermd.net/, feel free to check it.
‘Webserver configuration’ section says:
Webserver is not Apache 1.x → OK (Apache/N-G-I-N-X-htaccess-support)
If nginx does not use .htaccess like you said I don’t have any idea that I have or have not nginx
I created a simple .htaccess file that redirects to another web address and worked, so I assume that mod_rewrite is supported correctly.
(all files were generated automatically - I did not make any changes to them)
.htaccess in public_html
RewriteEngine On
RewriteRule ^(.*)$ public/$1
.htaccess in /public
### SILVERSTRIPE START ###
Deny access to templates (but allow from localhost)
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
Deny access to IIS configuration
Order deny,allow
Deny from all
Deny access to YAML configuration files which might include sensitive information
<Files ~ “.ya?ml$”>
Order allow,deny
Deny from all
Route errors to static pages automatically generated by SilverStripe
ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html
# 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
# Enable HTTP Basic authentication workaround for PHP running in CGI mode
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
### SILVERSTRIPE END ###
index.php in /public
<?php
use SilverStripe\Control\HTTPApplication;
use SilverStripe\Control\HTTPRequestBuilder;
use SilverStripe\Core\CoreKernel;
use SilverStripe\Core\Startup\ErrorControlChainMiddleware;
// Find autoload.php
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
require __DIR__ . '/../vendor/autoload.php';
} elseif (file_exists(__DIR__ . '/vendor/autoload.php')) {
require __DIR__ . '/vendor/autoload.php';
} else {
header('HTTP/1.1 500 Internal Server Error');
echo "autoload.php not found";
exit(1);
}
// Build request and detect flush
$request = HTTPRequestBuilder::createFromEnvironment();
// Default application
$kernel = new CoreKernel(BASE_PATH);
$app = new HTTPApplication($kernel);
$app->addMiddleware(new ErrorControlChainMiddleware($app));
$response = $app->handle($request);
$response->output();