this is my first time I try to put some project on web server. I really don't know how to set the .htaccess file of my Zend Framework project.
I have this structure:
/webroot
/ZendProject
/application
/docs
/library
/public
/css
/images
/js
.htaccess
index.php
/tests
/include
this is my default .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Thanks for help
Your public directory .htaccess should be something like this
<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} cron.php
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
<IfModule !rewrite_module>
DirectoryIndex alert.php
</IfModule>
If you host your project somewhere where you don't have control over Apache, add this .htaccess file to your project root
RewriteEngine On
RewriteRule ^.*$ public/index.php [NC,L]
php_value magic_quotes 0
php_flag magic_quotes off
php_value magic_quotes_gpc 0
php_flag magic_quotes_gpc off