Skip to content

Instantly share code, notes, and snippets.

@aminaminamin93
Created May 17, 2017 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aminaminamin93/4e50814b28820d0b5d532add9296a99e to your computer and use it in GitHub Desktop.
Save aminaminamin93/4e50814b28820d0b5d532add9296a99e to your computer and use it in GitHub Desktop.
CakePHP on GoDaddy Shared Hosting .htaccess settings
#Need to add three .htaccess files as well as configure the database.php file
####### In the root directory
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
####### In the app directory
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
###### In the webroot
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment