Skip to content

Instantly share code, notes, and snippets.

@harshamv
Last active August 4, 2020 12:38
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 harshamv/a6f20c8aa34d7d28f331 to your computer and use it in GitHub Desktop.
Save harshamv/a6f20c8aa34d7d28f331 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>
@himanshuvora
Copy link

awesome... thanks for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment