I have this htaccess file that's used in my zend project. We just moved from apache to nginx

# Rewrite rules for Zend Framework
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/public.*
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php

# Security: Don't allow browsing of directories
Options -Indexes

#RewriteBase '/'

Part of my nginx server file has this

            location /public {
            }
            location ~ \.(js|ico|gif|jpg|png|css)$ {
            }
            location /not_found {
            }
            location /404.html {
                    internal;
            }

When we were on apache the /public folder would be domain.com/public/js/ColVis.min.js

Now nginx is making the URL's like this, it appends /public to whatever URL you are on the site domain.com/billingpreferences/public/js/ColVis.min.js

This is breaking the entire site, what can I change in the nginx config file

link|improve this question

43% accept rate
Try having a look at anilcetin.com/convert-apache-htaccess-to-nginx it might be able to help you. I am not an nginx expert though. – Frands Hansen Dec 26 '11 at 15:13
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.