4

Coming from CodeIgniter, I'd like to learn Laravel. But I'm breaking my head 2 days over a (small) problem.

When I browse to the URL "laravel.app", It shows me the folder content instead of the index-page of Laravel.

These are my settings:

Virtual Host:

<VirtualHost *:80>
 DocumentRoot "/Applications/MAMP/htdocs/laravel/public"
 ServerName laravel.app

 <Directory "/Applications/MAMP/htdocs/laravel/public">
  Options All
  AllowOverride All
 </Directory>
</VirtualHost>

.htaccess:

<IfModule mod_rewrite.c>
 Options +FollowSymLinks
 RewriteEngine On
 Order allow,deny
 Allow from all
</IfModule>

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

I added "Order allow, deny" and "Allow from all", else I get a 404. What could be the problem?

Regards

2 Answers 2

4

I would verify public/index.php exists, and then try adding this line to your .htaccess file.

DirectoryIndex index.php

You may also want to tag this with "mamp". Hope you find it!

Sign up to request clarification or add additional context in comments.

2 Comments

I added the "DirectoryIndex", now it goes to the index page, but as you can read from above, I receive raw content of the php. When I remove the "Order allow,deny" and "Allow from all" I receive the following error: 403, You don't have permission to access / on this server.
K. Found my problem, PHP5 was outcommend in my httpd.conf.
0

Did you check application/config/application.php for following entry?

'index' => 'index.php',

unless you have mod_rewrite for clean_urls setup

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.