http.conf has mod rewrite uncommented
so no custom routes are working someone in #laravel mentioned it would be because mod rewrite isn't working here is my setup:
laravel.conf has the following code:
Alias /laravel/ "C:\BitNami/frameworks/laravel/public/"
Alias /laravel "C:\BitNami/frameworks/laravel/public"
<Directory "C:\BitNami/frameworks/laravel/public">
Options +MultiViews
AllowOverride None
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
</Directory>
If I uncomment these lines:
#RewriteEngine On
#RewriteRule ^/$ /laravel/ [PT]
then the main route will map to
http://localhost/
rather than
http://localhost/laravel
which is preferable but secondary to the main problem
.htaccess inside the public folder has this:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /laravel
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
here is my test code inside routes.php:
Route::get('test',function(){
return 'test worked';
});
which should resolve with
http://localhost/laravel/test
but instead I get a 404 error