Figured out why it wasn't working. The answer was in the proxy_pass directive. During the working: * two or by more slashes are converted into one slash: "//" -- "/"; * references to the current directory are removed: "/./" -- "/"; * references to the previous catalog are removed: "/dir /../" -- "/". the matching fby richardsd - Migration from Other Servers
hi edogawaconan, that's what the documentation says as well but it didn't work. in fact, i was able to prove that it was not necessary (to add the domain) because the following redirects /foobar to /barfoo rewrite ^/(foo)(bar)$ /$2$1 permanent; the rewrite works for simple cases like foobar, so is it possible that "complicated" regex parsing in nginx isn't working? thank you,by richardsd - Migration from Other Servers
Hi there, I used to have this in Apache (from http://stackoverflow.com/questions/476456/why-does-rewriterule-page-page-php-l-match-site-com-page) RewriteCond %{THE_REQUEST} ^+\ /(([^/\ ]+/)*)/+([^\ ]*) RewriteRule // /%1%3 In Nginx, it is simply rewrite ^/(([^/\ ]+/)*)/+([^\ ]*) /$1$3? permanent; It used to work in Apache and I tested the new regex with http://www.reby richardsd - Migration from Other Servers