Created
October 26, 2013 15:54
-
-
Save thulioph/7171004 to your computer and use it in GitHub Desktop.
urls amigáveis com .htaccess
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
# 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