subdirs without trailing slash

purabdk purabdk at yahoo.co.in
Thu Aug 13 14:05:57 MSD 2009


Use following lines in your nginx.conf file.


server {
        listen       80;
        server_name  localhost.localdomain;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
server_name_in_redirect off;
optimize_server_names off;

  dav_methods PUT DELETE MKCOL COPY MOVE;
  dav_access group:rw all:r;
  create_full_put_path on;

  include /etc/nginx/fastcgi_params;
  fastcgi_param SCRIPT_FILENAME /var/www/webdav-extensions.php;
  fastcgi_param DEPTH $http_depth;


    if (-d $request_filename) { rewrite ^(.*[^/])$ $1/ break; }
    if ($request_method = MKCOL) { rewrite ^(.*[^/])$ $1/ break; }

This will solve your problem

-- 
View this message in context: http://n2.nabble.com/subdirs-without-trailing-slash-tp3282494p3436855.html
Sent from the nginx mailing list archive at Nabble.com.





More information about the nginx mailing list