nkarmi
nkarmi

Reputation: 277

Symfony2 move app.php from web directory to root directory

I moved app.php from web directory to root and i change the following two lines:

$loader = require_once __DIR__.'/app/bootstrap.php.cache';
require_once __DIR__.'/app/AppKernel.php';

Also i move .htaccess file from web directory to root , my problem is that now the system cannot find JavaScript and CSS files.

Upvotes: 0

Views: 418

Answers (2)

po_taka
po_taka

Reputation: 1846

You need to move all content from "web" to "/". see @Marcel Burkhard answer

Also you need to "play" a little with .htaccess, because allowing everyone to read your config is very bad.

Upvotes: 0

Marcel Burkhard
Marcel Burkhard

Reputation: 3523

In your composer.json you have these lines:

"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",

You need to update those and run composer update to make your bootstrap.php.cache file ready for the new structure.

Upvotes: 1

Related Questions