我希望我的Nginx服务动态网址为静态网页,例如如何使用nginx将动态URL作为静态页面处理?
given a url "/book?name=ruby_lang&published_at=2014" ,
the nginx will serve a static file (which is generated automatically) named as:
"book?name=ruby_lang&published_at=2014.html" or:
"book-name-eq-ruby_lang-pblished_at-eq-2014.html"
这是可能的吗?
注:
1.there的命名没有静态文件:
"book?name=ruby_lang&published_at=2014.html" nor
"book-name-eq-ruby_lang-pblished_at-eq-2014.html"
然而,如果需要,我可以生成它们。
2.我无法更改给消费者的网址。例如我的消费者只能通过发送请求给我
"/book?name=ruby_lang&published_at=2014"
但没有与其他任何网址。
你是什么意思的“serve as static”?你有名为“book-name-eq-ruby_lang-pblished_at-eq-2014.html”的文件? –
你的CMS是否支持自定义网址? –
我添加了评论,查看更新。谢谢 –