I have a Laravel 5.3 website, but now that I want to put it online on my server, I realize that I can't change the vhosts to make it work properly.
How can I make my website work, without vhost? I now that Zend Framework can run just fine using only .htaccess
configurations. That is a way of doing it for Laravel?
The solution should allow the website to work both ways: with and without the vhosts!
This is may help. copy everything from myproject/public to public_html
open public_html/index.php and set:
require DIR.'/../myproject/bootstrap/autoload.php';
$app = require_once DIR.'/../myproject/bootstrap/start.php';
and put this on top:
ini_set('eaccelerator.enable', 0);
Last create a .htaccess file on root directory. Create an .htaccess file on your laravel's root directory. This is to access it without the "public" on the url.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>