Any one know how to preserve post data while doing redirect? The scenario is that I have both http and https accepting connection, I want (internally?) redirect http post request to https counterpart. Thanks!by zflairz - Nginx Mailing List - English
I'm getting the error like this: nginx: could not build the map_hash, you should increase either map_hash_max_size: 2048 or map_hash_bucket_size: 64 I solved it by setting large values to those two variables, but I didn't quite the why. Could someone explain more about those two values? Thanks! map_hash_bucket_size "The directive sets the maximum size in a hash table to map variablby zflairz - Nginx Mailing List - English
okay, I see. By adding a slash ($uri/) solved the index problem. Another minor stuff is: I didn't see following return syntax on the website (http://wiki.nginx.org/HttpRewriteModule#return) Is the uri after return code newly added (as an optional value)? I'm using Nginx 1.0.4. Thanks. return 301 $redirected_uri;by zflairz - Nginx Mailing List - English
I think I need "location ~* ^/.+" instead of "location /" because I have this: location / { index index.html; } so www.example.com will read /index.html, while in the case of "location /", it can't find / in mapping, then return 404. Am I right?by zflairz - Nginx Mailing List - English
I'm using map module to redirect URLs which have been removed (but indexed by search engine). But how can I fall back to http 404 response for urls not present in my redirect list? I've tried following, but I got 200 instead of 404: location ~* ^/404$ { return 404; } error_page 404 = /404.html; map $uri $redirected_uri {by zflairz - Nginx Mailing List - English
Thank you. I'm doing exactly the same (as also suggested by others in another thread) :-)by zflairz - Nginx Mailing List - English
Is this HttpMapModule an O(1) (not O(N)) operation when doing the lookup? This is because I have tens of thousands of urls to be mapped (can't derive a regular expression out of them), so an O(1) is perf-wise required. Thank you!by zflairz - Nginx Mailing List - English
Hi, Is there any way I can 301 redirect a lot of (>10k) old urls to new urls in nginx conf? Writing 10k lines of rewrite rules seems to be not efficient as those rules will get checked for every single request. I'm thinking of some data structure like dict in python which can have a quick look up of the key and then do the redirect of the value. The question is how can I do that in nginx?by zflairz - Nginx Mailing List - English
Hi, Is there any way I can 301 redirect a lot of (>10k) old urls to new urls in nginx conf? Writing 10k lines of rewrite rules seems to be not efficient as those rules will get checked for every single request. I'm thinking of some data structure like dict in python which can have a quick look up of the key and then do the redirect of the value. The question is how can I do that in nginx?by zflairz - Nginx Mailing List - English