0

I have a laravel project. When I host it in a subdomain and add the file .htaccess to redirect to the public folder, I get the HTTP ERROR 500. First I thought that the error was from the host, but I changed the project and it worked, so the problem has to be the laravel.

my .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On

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

I don't have any idea to resolve it.

Can any one help me?

Avag Sargsyan
  • 2,437
  • 3
  • 28
  • 41
Nuno
  • 61
  • 1
  • 10

1 Answers1

0

I have some legacy apps running Laravel with Apache and for them this is the .htaccess that I use to redirect to the public folder.

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/public/
  RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
user2094178
  • 9,204
  • 10
  • 41
  • 70