Skip to content

Instantly share code, notes, and snippets.

@farindra
Last active November 14, 2019 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farindra/19531f389d19e440abeb972c7258205a to your computer and use it in GitHub Desktop.
Save farindra/19531f389d19e440abeb972c7258205a to your computer and use it in GitHub Desktop.
htaccess laraver mode
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