Skip to content

Instantly share code, notes, and snippets.

@Guley
Last active October 29, 2020 20:00
Show Gist options
  • Save Guley/6b114d33eb7420a0a07d58670d965a8c to your computer and use it in GitHub Desktop.
Save Guley/6b114d33eb7420a0a07d58670d965a8c to your computer and use it in GitHub Desktop.
Laravel 5 remove public and index.php
**In order to use mod_rewrite you can type the following command in the terminal:**
# Unable rewrite mode
sudo a2enmod rewrite
# Disable rewrite mode
sudo a2dismod rewrite
**Restart apache2 after**
sudo systemctl restart apache2
**Rename your server.php to index.php**
**Here is root directory .htaccess file:**
<IfModule mod_rewrite.c>
Options +FollowSymLinks -Indexes
RewriteEngine On
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
@vipertecpro
Copy link

Good job

@hercomandiren
Copy link

Хуйня

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