Skip to content

Instantly share code, notes, and snippets.

@thekavish
Last active May 10, 2019 19:19
Show Gist options
  • Select an option

  • Save thekavish/e606c8236c4077071d6be5db455ce7e0 to your computer and use it in GitHub Desktop.

Select an option

Save thekavish/e606c8236c4077071d6be5db455ce7e0 to your computer and use it in GitHub Desktop.
How to remove /public from Laravel web application
# Add this file in your application root directory
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond $1 !^(index\.php|\.well-known)
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
@thekavish
Copy link
Copy Markdown
Author

With this method you do not need to modify any default file structure of the app.
Add this file into your application directory (outside public/ folder).

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