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

  • Does this answer your question? [How Can I Remove “public/index.php” in the URL Generated Laravel?](https://stackoverflow.com/questions/23837933/how-can-i-remove-public-index-php-in-the-url-generated-laravel) – Buttered_Toast Feb 03 '22 at 14:10

1 Answers1

-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');
});
onkaram
  • 560
  • 2
  • 7