Nginx: URL Redirect and regex -


i trying clean url blog's (movable type) search script using rewrite in nginx.

clean search url: (xxx= tag name ex. apple) when access url 404 not found.

http://cgi.blogurl.com/content/brand/apple/ 

regular search url script path:

http://cgi.blogurl.com/mt/mt-search.cgi?includeblogs=1&tag=apple&limit=20

here have far:

server {     listen              80;     server_name  cgi.blogurl.com;      if ($host = "cgi.blogurl.com") {            rewrite ^/([^/]*)/$ /mt/mt-search.cgi?blog_id=1&tag=$1&limit=10 break;     } } 

rewrite ^/?content/brand/([^/]+)/?$ /mt/mt-search.cgi?blog_id=1&tag=$1&limit=10 break; 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -