I've read several places trying to use ZendFramework directly from htdocs (without creating virtual servers) for every test environment I use. This is a development environment, that's the reason I don't care about security issues nor want to modify the hosts file every time. I work on Windows using xampp 1.7.3
I recreate the zend structure but inside a folder into htdocs. Lets say: C:\xampp\htdocs\project
By now, I found a solution using the following .htaccess in the projects root
RewriteEngine On
RewriteRule ^(.*)$ public/$1?%{QUERY_STRING} [QSA,L]
Inside C:\xampp\htdocs\project\public I use the default's Zend .htaccess
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
In my layout I add the base
tag to redirect img, css and js links. My problem arises when I try to include a css font to my project (woff file) that's been redirected anywhere in the htaccess rules resulting in a 400 error code.
So my question is: What's wrong here? how can I redirect every controller (php file) but no any other existing file
By the way... I can't find the way to make htaccess files work by my own. I've always found myself searching for help :(
Thanks in advance