Last active
June 20, 2017 16:56
-
-
Save rraspo/4fa3e971178de6c838c35dc45567646c to your computer and use it in GitHub Desktop.
Remove public/index.php from the url generated by Laravel by adding htaccess on public directory
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
| #!/bin/bash | |
| # Make sure httpd.conf has DocumentRoot pointing to /public/ directory | |
| # and that access to the default document root has directive AllowOverride set to All | |
| cat >/var/www/html/.htaccess <<EOL | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteRule ^(.*)$ public/$1 [L] | |
| </IfModule> | |
| EOL | |
| cat /var/www/html/.htaccess |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment