Reputation: 3321
I have a Laravel5 project which is hosted on my server in a subfolder. I want access the project by www.example.com/edu
I failed. I add a .htaccess
file in root with
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
But doesnot work, when I go to www.example.com/edu/public
it works fine. How to remove public from url. Thank you.
Upvotes: 1
Views: 367
Reputation: 6539
Try this Rule:-
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
This link1 and link2 helps you.
Hope it will work for you :)
Upvotes: 1