transfering to public_html

Laraship QuestionsCategory: Technicaltransfering to public_html
goldendatawm asked 6 years ago

Hello Dear

I want to see my site without "/public" is it possible? If yes let me know.

Thanks alot

1 Answers
laraship Staff answered 6 years ago

Just create .htaccess file at root and add these lines to it

<IfModule mod_rewrite.c>
RewriteEngine On

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


The above code works on the root public_html folder. Having said that your core laravel file should be inside the public_html folder, if your directory looks like public_html/laravelapp/public and if you put the above code inside laravelapp it won’t work. Therefore you must copy all your core files into public_html and put the .htaccess file there .




If you want to keep the code in a subdirectory then you can create a subdomain then this code will work for that also.