Last active
November 14, 2019 06:22
-
-
Save farindra/19531f389d19e440abeb972c7258205a to your computer and use it in GitHub Desktop.
htaccess laraver mode
This file contains 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
Don't get confused with other option the snippet below I am using and will be useful for you too. Put the below htacces in your root. | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
# Force SSL | |
#RewriteCond %{HTTPS} !=on | |
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
RewriteRule ^$ public/ [L] | |
RewriteRule (.*) public/$1 [L] | |
</IfModule> | |
Go to your public directory and put another htaccess file with the code snippet below | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Removes index.php from ExpressionEngine URLs | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?url=$1 [PT,L] | |
</IfModule> | |
#//laravel folder permission | |
chgrp -R www-data storage bootstrap/cache | |
chmod -R ug+rwx storage bootstrap/cache | |
#// edit alias linux | |
#nano ~/.bashrc | |
#alias ke_path='/path' | |
#. ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment