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

seen's avatar
Level 4

change the redirect root directory for main domain in shared hosting

I have shared hosting and I deployed my Laravel project to it, and now I want to change Document Root from public_html to public_html/public

0 likes
2 replies
7ibbe77s's avatar
Route::group(['prefix' => 'public_html'], function() {
    Route::get('', function() {
        return view('public_html.public_html');
    }) -> name("public_html");


    


    Route::get('public', function(){
        return view('public_html.public');
    }) -> name('public');

    
});

Please or to participate in this conversation.