Skip to content

Instantly share code, notes, and snippets.

@thulioph
Created October 26, 2013 15:54
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 thulioph/7171004 to your computer and use it in GitHub Desktop.
Save thulioph/7171004 to your computer and use it in GitHub Desktop.
urls amigáveis com .htaccess
# Urls Amigáveis com .htaccess
# material de apoio: http://blog.thiagobelem.net/aprendendo-urls-amigaveis/
# Instruções
# primeiro vem o endereço novo e depois vem o endereço atual
# cada linha de RewriteRule representa uma url do seu projeto
# OBS: Quando for linkar as páginas no html não precisa incluir a extensão.
# seguindo o exemplo abaixo, só é necessário <a href="projetos">
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index/?$ /index.php [NC,L]
RewriteRule ^empresa/?$ /empresa.php [NC,L]
RewriteRule ^contato/?$ /contato.php [NC,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment