Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to redirect to public folder on laravel

I have this structure:

My domain: www.example.com

and this is my laravel's project folder: http://www.example.com/project

and I would like to redirect to http://www.example.com/project/public

I know this answer has been answered before but I try to implement it and not work for me.

Sorry for my english, I just speak spanish

like image 220
Andres Ruales Avatar asked Apr 23 '15 16:04

Andres Ruales


2 Answers

For htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteCond %{REQUEST_URI} !project/public/
RewriteRule (.*) /project/public/$1 [L]

Put it into your public_html/ or www/ folder where is the root of example.com/

like image 146
Germanaz0 Avatar answered Oct 13 '22 00:10

Germanaz0


rename /server.php to index.php

like image 44
Basem Olimy Avatar answered Oct 13 '22 00:10

Basem Olimy