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

Viernes's avatar

Redirect my Project to dashboard

I set my Hosts file to

127.0.0.1       app.test

and Vhosts in Apache

##<VirtualHost *:80>
    ##ServerAdmin [email protected]
    ##DocumentRoot "F:/xampp/htdocs/test/public"
    ##ServerName app.test
    ##ErrorLog "logs/dummy-host2.example.com-error.log"
    ##CustomLog "logs/dummy-host2.example.com-access.log" common
##</VirtualHost>

The Problem when i enter app.test it redirect me to http://me.test/dashboard/ not to my laravel Project.

0 likes
11 replies
salmon's avatar

I think it might have to do with your routes/web.php file in laravel.

Maybe do a global search for dashboard to see where it is being called.

Viernes's avatar

@salmon This's my routes/web.php file

Route::get('/', function () {
    return view('welcome');
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

Route::resource('/posts','PostController');

Viernes's avatar

@salmon

<!doctype html>
<html lang="{{ app()->getLocale() }}">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>Laravel</title>

        <!-- Fonts -->
        <link href="https://fonts.google.com/specimen/Changa" rel="stylesheet" type="text/css">

        <!-- Styles -->
        <link href="{{ asset('css/app.css') }}" rel="stylesheet">
        <link href="{{ asset('css/Fonts.css') }}" rel="stylesheet">

        <style>
            html, body {
                background-color: #fff;
                color: #636b6f;
                font-family: 'Raleway', sans-serif;
                font-weight: 100;
                height: 100vh;
                margin: 0;
            }

            .full-height {
                height: 100vh;
            }

            .flex-center {
                align-items: center;
                display: flex;
                justify-content: center;
            }

            .position-ref {
                position: relative;
            }

            .top-right {
                position: absolute;
                right: 10px;
                top: 18px;
            }

            .content {
                text-align: center;
            }

            .title {
                font-size: 84px;
            }

            .links > a {
                color: #636b6f;
                padding: 0 25px;
                font-family: AraJozoor;
                font-size: 12px;
                font-weight: 600;
                letter-spacing: .1rem;
                text-decoration: none;
                text-transform: uppercase;
            }

            .m-b-md {
                margin-bottom: 30px;
            }

        </style>
    </head>
    <body>
        <div class="flex-center position-ref full-height">
            @if (Route::has('login'))
                <div class="top-right links">
                    @auth
                        <a href="{{ url('/home') }}">Home</a>
                    @else
                        <a href="{{ route('login') }}">{{ __('login') }}</a>
                        <a href="{{ route('register') }}">{{ __('register') }}</a>
                        <a href="#" onclick="window.print()">{{__('print')}}</a>
                    @endauth
                </div>
            @endif

            <div class="content">
                <div class="title m-b-md">
                    LaraTest
                </div>

                <div class="links">
                    <a href="">1</a>
                    <a href="">2</a>
                    <a href="">3</a>
                    <a href="">4</a>
                    <a href="">5</a>
                </div>
            </div>
        </div>
    </body>
</html>

newbie360's avatar

no idea why redirect to http://me.test/dashboard/

are you setup a virtual host named me.test before ?

open your windows cmd, and type

ipconfig /displaydns

see any about me.test there ?

try change your virtual host ServerName localhost.abc

and restart the server

Viernes's avatar

@newbie360 i tried and didn't work

ipconfig /displaydns 

nothing now i tried laragon and worked for me but i hope to get Xampp working

Snapey's avatar

If apache cannot match the request to one it thinks it is serving then it sends you to one of the others

Did you takethe comment symbols out of the vhost file and then restart apache?

appmeicher's avatar

In my case I had to cancel a couple of old v-hosts in httpd-vhosts.conf and then it worked... like if there was a limit to the number of v-hosts Apache can handle...

Please or to participate in this conversation.