Skip to content

Instantly share code, notes, and snippets.

@phamngsinh
Last active May 23, 2016 03:32
Show Gist options
  • Select an option

  • Save phamngsinh/488709ef595b8356a626117dc99a0c5d to your computer and use it in GitHub Desktop.

Select an option

Save phamngsinh/488709ef595b8356a626117dc99a0c5d to your computer and use it in GitHub Desktop.
Pretty URLs Laravel
.htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
apache2.conf //httpd.conf
<Directory />
Options FollowSymLinks
AllowOverride all
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
enable mod_rewrite/mod_header
sudo a2enmod headers
sudo a2enmod rewrite
sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment