Last active
October 29, 2020 20:00
-
-
Save Guley/6b114d33eb7420a0a07d58670d965a8c to your computer and use it in GitHub Desktop.
Laravel 5 remove public and index.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**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> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good job