Skip to content

Instantly share code, notes, and snippets.

@jaonoctus
Last active February 12, 2016 02:22
Show Gist options
  • Save jaonoctus/2173b7e807bf3042eb23 to your computer and use it in GitHub Desktop.
Save jaonoctus/2173b7e807bf3042eb23 to your computer and use it in GitHub Desktop.
tricks
# Alterar o arquivo index
DirectoryIndex login.php
# Usar isto para todos os casos abaixo
RewriteEngine on
# Remover ".php" no final da URL
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
# Paranauê URL amigável
RewriteRule ^([a-z\-0-9\/]+)/?$ /PortalAprovado/layout.php?page=$1 [NC]
# Forçar SSL
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment