Skip to content

Instantly share code, notes, and snippets.

@makzan
Created August 10, 2015 07:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save makzan/b4b3ad14568c6af01e1e to your computer and use it in GitHub Desktop.
Save makzan/b4b3ad14568c6af01e1e to your computer and use it in GitHub Desktop.
Remove "public" in URL in Laravel 5.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
@makzan
Copy link
Author

makzan commented Aug 10, 2015

Put this file in root of Laravel 5 folder.

@myadav2005
Copy link

Yes, It is working and now both URLs are working,
like
laravelwebsite.com/public & laravelwebsite.com

I need the website should be accessible only by laravelwebsite.com and not by laravelwebsite.com/public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment