Home > OS >  I have uploaded laravel project but its showing index of/admin. how to fix it?
I have uploaded laravel project but its showing index of/admin. how to fix it?

Time:05-05

I have uploaded laravel 8 project but its showing index of/admin in when I run the admin page. Please help me.

1

CodePudding user response:

Add .htaccess file in project's root directory with content

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

CodePudding user response:

To be sure you set default root folder to public.

If you using Apache you can rewrite with .htaccess:

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

Nginx with this:

root /var/www/your_domain/htdocs/public;
  • Related