Laravel met wamp
Als ik naar http://localhost/laravel/public/newpage ga krijg ik een 404 error.
Het werkt wel als ik naar http://localhost/laravel/public/index.php/newpage ga.
Ik werk met WAMP en de mod_rewrite staat aan.
Heeft iemand enig idee hoe ik dit kan oplossen?
En hoe ziet je .htaccess eruit?
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
</IfModule>
# For all files not found in the file system, reroute the request to the
# "index.php" front controller, keeping the query string intact
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
RewriteBase /laravel/
Met RewriteBase /laravel/public/ werkt het. Bedankt!
Heb je ook in application/config/application.php ook de application url leeg gemaakt?
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| The URL used to access your application without a trailing slash. The URL
| does not have to be set. If it isn't, we'll try our best to guess the URL
| of your application.
|
*/
'url' => '',
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| The URL used to access your application without a trailing slash. The URL
| does not have to be set. If it isn't, we'll try our best to guess the URL
| of your application.
|
*/
'url' => '',
in plaats van:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| The URL used to access your application without a trailing slash. The URL
| does not have to be set. If it isn't, we'll try our best to guess the URL
| of your application.
|
*/
'url' => 'index.php',
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| The URL used to access your application without a trailing slash. The URL
| does not have to be set. If it isn't, we'll try our best to guess the URL
| of your application.
|
*/
'url' => 'index.php',
Gewijzigd op 24/01/2013 16:55:29 door Roel Janssen