Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

HUNHammer98's avatar

Error 404 instead of login page while using xampp localhost

Hello,

When I hit localhost/appname I am getting my custom 404 page instead of the login page.

My routes (It was working perfectly fine with php artisan serve. As far as I know I am protecting the routes with Auth, so in either way it should redirect me to the login page):

Auth::routes(['register' => false]);

Route::group(['middleware' => ['auth']], function () {

    Route::redirect('/','systemlist/systemid');

If my code is correct I am assuming that, something wrong with my virtual host configuartion:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "C:/xampp72/htdocs/hanacmtv1.0/public"
    ServerName cmt.com
    ServerAlias www.cmt.com
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

Does anyone experienced this?

0 likes
2 replies
Snapey's avatar

with virtual host configured, you need to request http://cmt.com in your browser and not localhost/appname

for this to work, you need to add an entry in your hosts file;

127.0.0.1  cmt.com

and then remember to take this out when your site is published.

Please or to participate in this conversation.