Xampp本地主机无法正常工作 [英] Xampp localhost not working

查看:81
本文介绍了Xampp本地主机无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在xampp上运行laravel,访问页面时遇到问题, http://localhost/laravel/public/我得到一个很好的登录页面 但是,例如当我去http://localhost/laravel/public/smokeyard

I am running laravel on xampp and I have problem with accessing pages, http://localhost/laravel/public/ I get a login page which is good however when I go for example http://localhost/laravel/public/smokeyard

我收到The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.404错误

路线:

Route::get('smokeyard', 'GuzzleController@smokeyard');

控制器:

function smokeyard(){
    return view('smokeyard');
}

我所有的视图都位于资源文件夹中.

All my views are located in resources folder.

推荐答案

如果要在不运行artisan serve的情况下访问laravel项目,则需要更改一些设置,

if you want to access laravel project without running artisan serve, you need to change few settings,

  1. public folder复制.htaccess文件,然后将paste文件复制到application

  1. copy the .htaccess file from the public folder and paste it in the root folder of your application

rename root directory to index.php

现在转到localhost/your_project_name/smokeyard输入要检查的网址

now go to localhost/your_project_name/smokeyard for the url you want to check

希望这会有所帮助

这篇关于Xampp本地主机无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆