Skip to content

Instantly share code, notes, and snippets.

@wescleymatos
Created December 13, 2011 14:49
Show Gist options
  • Save wescleymatos/1472384 to your computer and use it in GitHub Desktop.
Save wescleymatos/1472384 to your computer and use it in GitHub Desktop.
Configuração do htaccess raiz para o cakephp
#Negar a acesso a tudo mundo e liberar para um ip
Order Deny,Allow
Deny from all
Allow from 192.168.1.103
<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