Skip to content

Instantly share code, notes, and snippets.

@WganMe
Created August 21, 2020 01:14
Show Gist options
  • Save WganMe/00041c1d555dc67c6e114df026907253 to your computer and use it in GitHub Desktop.
Save WganMe/00041c1d555dc67c6e114df026907253 to your computer and use it in GitHub Desktop.
CakePHP
The answer is that there are 3 different .htaccess files:
/var/www/app/webroot/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
/var/www/app/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
/var/www/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
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