Answer the question
In order to leave comments, you need to log in
The web folder in basic - how to remove if not UrlManager and not .htaccess?
Good afternoon,
Such a problem,
There is a project, when it was lying on a server, it had one .htaccess at the root:
AddDefaultCharset utf-8
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{HTTPS} != on
RewriteRule ^/?(.*) https://%poddomen.domen.com/$1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
AddDefaultCharset utf-8
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
</IfModule>
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} ^/.*
RewriteRule ^(.*)$ web/$1 [L]
RewriteCond %{REQUEST_URI} !^/web/
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ web/index.php
</IfModule>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
...
'urlManager' => [
'showScriptName' => false,
'enablePrettyUrl' => true,
'rules' => [
'<controller>/<action>' => '<controller>/<action>',
'<module:admin>/<action:\w+>' => '<module>/default/<action>',
'lk' => 'user/default/cabinet',
'profile' => 'user/default/profile',
'files' => 'user/default/files',
'files/view' => '/user/default/view_file'
]
],
...
Answer the question
In order to leave comments, you need to log in
There is an input script index.php it lies in the web folder, that's where it came from.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question