Skip to content

Instantly share code, notes, and snippets.

@cinghaman
Created April 27, 2012 07:47
Show Gist options
  • Save cinghaman/2507115 to your computer and use it in GitHub Desktop.
Save cinghaman/2507115 to your computer and use it in GitHub Desktop.
Cakephp .htaccess code
If you have a cakephp installation and want to add additional folders in public_html edit your root .htaccess file with this
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/site.*
RewriteCond %{REQUEST_URI} !-f
RewriteRule (.*) app/webroot/$1 [L]
RewriteCond %{REQUEST_URI} !^/site.*
RewriteCond %{REQUEST_URI} !-d
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
“site” — replace with your folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment