Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel install in sub folder showing 404 page

Tags:

php

laravel

I moved Laravel file to subfolder and hit url localhost/test/public it's working fine but I want to use url localhost/test. I put .htaccess in test folder but than localhost/test showing 404

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
like image 745
Rameshwar Patnaik Avatar asked Sep 16 '25 01:09

Rameshwar Patnaik


1 Answers

create a .htaccess file in your root path

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L,QSA]
like image 93
Shankar S Bavan Avatar answered Sep 18 '25 17:09

Shankar S Bavan