Hi all, Trying to redirect http://domain.tld to http://domain.tld/gallery ISPConfig setup: Code: Redirect type = permanent Redirect path = http://domain.tld/gallery/ Which generates these lines in the NginX vhost file: Code: if ($http_host ~* "^domain.tld$") { rewrite ^/(.+)$ http://domain.tld/gallery/$1 permanent; } if ($http_host ~* "^www.domain.tld$") { rewrite ^/(.+)$ http://domain.tld/gallery/$1 permanent; } If an index.html file is present in http://domain.tld, the resulting URL is: Code: http://domain.tld/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/gallery/index.html If NO index.html file is present, I get this error: Code: 403 forbidden System info: Debian 6.0 NginX 1.0.14 (dotdeb) Please assist, I've tried everything. Best regards Jim
I came up against this issue as well, none of the redirect options worked in Nginx and for permanent redirects we got the OP issue with the recursive paths. I added a manual redirect to suit our requirements, which was to redirect a domain to a specific path using a permanent redirect HTTP code. if ($http_host ~* "^example.com$") { rewrite ^.+$ http://example.org/target/path permanent; } Obviously there are improvements around that using try_files but it works for now. http://wiki.nginx.org/HttpRewriteModule#if If I'm reading it correctly, the rewrite ISPC adds would only work if the URL has a trailing slash: rewrite ^/(.+)$ http://domain.tld/gallery/$1 permanent; What is the bug # , searched but couldn't find it?
This has been fixed in SVN already: http://bugtracker.ispconfig.org/ind...ng=nginx+redirect&project=3&search_name=&type[0]=&sev[0]=&pri[0]=&due[0]=&reported[0]=&cat[0]=&status[0]=&percent[0]=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto=
Great, thanks, any news on 3.0.5 release date. I have people asking why redirects aren't working so I'd like to give them an ETA. Thanks