OK, so after bashing my head on this problem for a little over a day... I got up and did what I SHOULD have done yesterday, and DEBUGGED what was going on!
What Laravel is TRYING to do here, is insert the file index.php
right in front of the path given as a Route. SO for instance, if you specified a Route::get('/account/create', ...,
and execute your app from say localhost/laravel/authenticate/public/account/create
on your browser, then laravel wants to execute localhost/authenticate/public/index.php/account/create
, but to do that.... Apache needs to see that requests through /wamp/www/laravel/laravel/authentication/public
(your path may vary somewhat, depending on where your laravel app is actually installed, but the trailing public
is where the substitution needs to take place) must have a 'RewriteRule' applied.
Thankfully, laravel supplies the correct Rewrite rule in a handy .htaccess
file right there in your app's public
folder. The PROBLEM is, the code in that '.htaccess' file won't work with the way WAMP is configured out of the box. The reason for this SEEMS to be the problem suggested by muvera at the top of this thread -- the rewrite_module code needs to be loaded by Apache before the RewriteRule
stuff will work. Heck this makes sense.
The part that DOESN'T make sense: simply stopping
and restarting
Apache services will not pick up the changes necessary for WAMP to do the right thing with your RewriteRule -- I know, I tried this many times!
What DOES work: make the changes suggested by muvera (see top of thread) to load the correct modules. Then, reset your whole Windows session, thus dumping Apache out of memory altogether. Restart (reload) WAMP, and VOILA! the fix works, the correct RewriteRule is applied, yada, yada; I'm living happily ever after.
The good news out of all this: I know a LOT more about .htaccess
, RewriteRule
, and httpd.conf
files now. There is a good (performance) argument for moving the logic from your app's public
.htaccess
file, and putting it into a Directory ...
section of your httpd.conf in your Apache 'bin' folder BTW (especially if you have access to that folder).