Laravel met wamp

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Rob van der W

Rob van der W

10/01/2013 19:16:52
Quote Anchor link
Ik ben vandaag begonnen met laravel en volg daarbij een tutorial. Maar ik zit nu met het volgende probleem:

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?
 
PHP hulp

PHP hulp

29/03/2024 08:09:40
 
- Ariën  -
Beheerder

- Ariën -

10/01/2013 19:17:51
Quote Anchor link
En hoe ziet je .htaccess eruit?
 
Rob van der W

Rob van der W

10/01/2013 19:37:09
Quote Anchor link
Die heb ik niet aangepast. Dus die bij laravel zit:

<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>
 
- Ariën  -
Beheerder

- Ariën -

10/01/2013 19:40:20
Quote Anchor link
Voeg eens na je RewriteEngine On dit eens toe:
RewriteBase /laravel/
 
Rob van der W

Rob van der W

10/01/2013 19:54:13
Quote Anchor link
Met RewriteBase /laravel/public/ werkt het. Bedankt!
 
Roel Janssen

Roel Janssen

24/01/2013 16:54:08
Quote Anchor link
Hoi,

Heb je ook in application/config/application.php ook de application url leeg gemaakt?

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
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' => '',


in plaats van:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
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',
Gewijzigd op 24/01/2013 16:55:29 door Roel Janssen
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.