There is a folder structure:

/framework /web /index.php /images /css /src /app 

There is .htaccess

 <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /web/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [QSA,L] </IfModule> 

And there is a file layout.html.php, in which the paths to the pictures are written as follows: <img src="/images/img.png" /> . It's clear that all this is not working as we would like. Namely, to work correctly, you need to write: <img src="/web/images/img.png" /> .

What I need to change in the mod_rewrite settings, I do not really understand. Tell me please.

  • Where is htaccess and where is layout.html.php? - Get
  • .htaccess I tried to put both in the root and in / web. The location of layout.html.php should not play a special role, because the paths to the pictures are written from the root of the site. But if that - it is in / src / views. - nulpatrol

1 answer 1

The host itself must be configured on / web, then the images and files will be uploaded via / images /.

web in order to make the framework files inaccessible.

  • Thank you, changed the virtual domain setting, everything worked out :) - nulpatrol