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.
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.
@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');
Hi @Viernes can you show me what you have in welcome.blade.php ?
@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>
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
@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
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?
Thanks @salmon it's worked finally <VirtualHost 127.0.0.1:80>
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 sign in or create an account to participate in this conversation.