0

I am using laragon server for php 7.2 laravel. I have tried a lot to remove public keyword from my url http://localhost/myLaravel/public/ by its normal method of copying .htaccess folder in my laravel project directory as well as by copying and renaming server file to index.php. But it didn't work. whenever i write this url: http://localhost/myLaravel/ it give me following error: Forbidden You don't have permission to access /myLaravel/ on this server.

Any solution?

2 Answers2

1

Laravel app is not meant to be accessible in a subdirectory by default. You can do one of the following:

Robo Robok
  • 21,132
  • 17
  • 68
  • 126
0

You can use this htaccess code in laravel root directory.

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Rhl singh
  • 88
  • 1
  • 3