Mostly, you need to have virtual URL points to your app. Try the answers here: https://stackoverflow.com/questions/15607132/laravel-route-not-working-with-wamp
PHP For Beginners "page not found" using WampServer
I have followed the "php For Beginners" series on laracasts and I have made it to episode 15 "Make A PHP Router" and up to that point I have been using php -s localhost:8888 to spin up a server and it all works fine. Then I decided to open it up in wampserver, so I create the virtual host and I can only reach the home page. The other links give me the
Not Found
The requested URL was not found on this server.
Apache/2.4.46 (Win64) PHP/8.0.10 Server at demo Port 80
Thank you for your help ahead of time.
@lemmon added htaccess:
Options -Indexes
<IfModule mod_headers.c>
RequestHeader unset Proxy
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /phpb/
RewriteRule ^(.*)$ index.php? [QSA,L]
</IfModule>
Tweaked:
<?php
//echo "hello";
define('DIR', realpath(__DIR__) . '/');
require 'functions.php';
require 'Database.php';
require 'Response.php';
require 'router.php';
echo DIR;
tweaked router
require DIR . $routes[$uri];
tweaked routes:
'/phpb/about' => '/controllers/about.php',
Clicked About, it works, so app just needs tweaks, I used XAMPP.
phpb is folder I put project.
Please or to participate in this conversation.