I am trying to use Laravel 5.1 for the first time. I was able to install it and https://sub.example.com/laravel/public/
is displaying what is should. However, v
if you are on ubuntu you shoud do 3 thing. 1. check if "/var/www/html/YourProject/public/ .htacess " is like this.
Options -MultiViews
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
2. Add this lines on /etc/apache2/sites-available/000-default.conf
AllowOverride all
Require all granted
Note: remember that is an system file so you should use this comamd
sudo gedit /etc/apache2/sites-available/000-default.conf
by last enable rewrite module.
LoadModule rewrite_module modules/mod_rewrite.so
or
sudo a2enmod rewrite