0

suppose my site open with the url https://www.example.com and it also opens with the https://www.example.com/index.php but i want it to open only with the https://www.example.com ONLY and not with https://www.example.com/index.php

just want to know how to remove index.php from my url

1

1 Answer 1

-2

You can create a route with https://www.example.com/index.php that will redirect to user to https://www.example.com whenever user try to access https://www.example.com/index.php.

Eg. In you web.php file you can add a route like this.

Route::get('https://www.example.com/index.php', function () { 
    return redirect('https://www.example.com');
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.