Skip to content

Instantly share code, notes, and snippets.

@BernardoSilva
Created March 13, 2014 21:08
Show Gist options
  • Save BernardoSilva/9537024 to your computer and use it in GitHub Desktop.
Save BernardoSilva/9537024 to your computer and use it in GitHub Desktop.
this is a way to make zf2 work on a shared hosting
#make ZF2 work on shared hosting using this htaccess
#SetEnv ZF2_PATH /home/username/zf2lib
RewriteEngine On
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]
RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^public/.*$ /public/index.php [NC,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment