Skip to content

Instantly share code, notes, and snippets.

@victorcosta12
Forked from wescleymatos/htaccess
Created December 21, 2011 19:18
Show Gist options
  • Save victorcosta12/1507284 to your computer and use it in GitHub Desktop.
Save victorcosta12/1507284 to your computer and use it in GitHub Desktop.
Configuração do htaccess raiz para o cakephp
<IfModule mod_rewrite.c>
RewriteEngine on
#forçar o www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,R=301]
# Acessar outra pasta na raiz do servidor
RewriteCond $1 ^(loja).*$ [NC]
RewriteRule (.*) - [L]
#regra padrão do cake
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment