Support the ongoing development of Laravel.io →
Configuration Requests Views
Last updated 1 year ago.
0

Try the link: http://localhost/test/trunk/php/l4/public/index.php/users - That should work.

The reason is because your "pretty urls" is not working. I use WAMP as well and have had this problem. Normally, the .htaccess provided by Laravel is correct, and doesn't need changed.

Things to try: 1.) If you've set up WAMP to use VHosts, make sure your VHost directory is pointing to the public directory. 2.) Check to make sure the Apache rewrite_module is checked and on. 3.) If not, try DrPrez's suggestion above. 4.) Keep googling, I found the answer eventually. Usually has to do with your configurations.

Good luck!

Last updated 1 year ago.
0

Thank you for the answers. @DrPrez, I tried changing my httpd.conf. I can get to the main page from localhost but when I do something like: http://localhost/users

then I still receive a page not found.

<pre> <VirtualHost 127.0.0.1:80> ##ServerAdmin webmaster@dummy-host2[dot]example[dot]com DocumentRoot "C:/wamp/www/test/trunk/php/l4/public" ServerName localhost ServerAlias localhost ##ErrorLog "logs/dummy-host2[dot]example[dot]com-error.log" ##CustomLog "logs/dummy-host2.example[dot]com-access.log" common </VirtualHost> </pre>

But that's not the ideal solution for me because I have other projects under the C:\wamp\www folders.

So without any VirtualHost directive in my httpd.conf file this URL works as @rginnow suggested: http://localhost/test/trunk/php/l4/public/index.php/users

@rginnow is correct I believe about the pretty URLs and I think .htaccess needs to be changed. I'm wondering how others got this to work in their WAMP Windows environment.

I'm still looking for the answer and there doesn't seem to be a lot of people with this problem it seems. I would've thought this to be more common because I'm just trying to follow the instructions on the Laravel. I haven't set up Vagrant though and I'm thinking this is what most people are doing?

@rginnow, @DrPrez, do you guys using Vagrant or a VM setup too?

@DrPrez, how did you display the code nicely on the forum? What tag did you use?

Last updated 1 year ago.
0

This is the solution:

.htaccess in the public folder. Notice the RewriteBase that needs to be changed based off of your locahost base:

<IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule>
RewriteEngine On
RewriteBase /test/trunk/php/l4/public/

# Redirect Trailing Slashes...
#RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

(just fyi, include the <IfModule> here. It's a bit mal displayed here. I don't know how to properly format the code to display properly. Sorry.)

Then you need to on WAMP (i.e. turn on your rewrite_module):

Using WAMP click on wamp icon ->apache->apache modules->scroll and check rewrite_module Restart a LoadModule rewrite_module

Then for WAMP, at least, you need to logout and log back in on your Windows. Strange but a restart of Apache doesn't work.

I can't really take credit for all this info but I had to test through what worked for me.

Try any of the other techs' posts here: http://stackoverflow.com/questions/11791375/laravel-routes-not...

I hope it works for you. =)

Father God bless you all<><

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

vkimura vkimura Joined 5 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.