Welcome! Log In Create A New Profile

Advanced

Re: XSLT and autoindex XML output: conditionally transform XML only when it's autoindex output?

Sergey Budnevitch
February 26, 2016 03:24PM
> On 26 Feb 2016, at 22:27, Moritz Wilhelmy <mw-nginx@barfooze.de> wrote:
>
> Hi,
>
> The documentation said it's possible to transform XML dirlistings into
> XHTML in order to customize what they look like, so I did one that makes
> them look like lighttpd's:
> https://gist.github.com/wilhelmy/5a59b8eea26974a468c9
>
> This works fine, but does anybody know how I apply the XSLT only
> to transform directory indexes but not other XML files that might be
> around? Currently, the way this config works is that all XML files are
> being transformed by this stylesheet.
>
> The config looks like this:
> https://gist.github.com/wilhelmy/5a59b8eea26974a468c9#file-nginx-snippet-conf


Cannot check with xslt right now, but autoindex should works with this setup:

root /opt/www;

location / {
try_files $uri @autoindex;
}

location @autoindex {
autoindex on;
}

Try to add xslt and xml directives in @autoindex location.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

XSLT and autoindex XML output: conditionally transform XML only when it's autoindex output?

Moritz Wilhelmy February 26, 2016 02:28PM

Re: XSLT and autoindex XML output: conditionally transform XML only when it's autoindex output?

Sergey Budnevitch February 26, 2016 03:24PM

Re: XSLT and autoindex XML output: conditionally transform XML only when it's autoindex output?

Moritz Wilhelmy February 26, 2016 03:50PM

Re: XSLT and autoindex XML output: conditionally transform XML only when it's autoindex output?

Guest84 March 05, 2016 01:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready