I'm trying to write a project with this framework. But when I upload my site in my shared host, I got error 404 in all of the site links, except site home page. While the site works fine in xampp.
My code:
html :
<li>
<a href="soon">
آرشیو مقاله
</a>
</li>
<li>
<a href="contact">
ارتباط با ما
</a>
</li>
<li>
<a href="about">
درباره ما
</a>
</li>
Routes.php :
Route::get('/', function () {
return view('home');
});
Route::get('/soon', 'NavigationController@soon');
Route::get('/about', function () {
return View::make('about');
});
Route::get('/contact', function () {
echo 'contact ';
});
NavigationController.php :
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class NavigationController extends Controller
{
function soon(){
return view('soon');
}
}
How can I fix this problem?
您的共享主机可能不支持mod_rewrite或未激活您的Webspace扩展?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.