【发布时间】:2014-03-28 18:30:38
【问题描述】:
我希望我的 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.没有静态文件命名:
"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"
但不包含任何其他网址。
【问题讨论】:
-
“充当静态”是什么意思?你有名为“book-name-eq-ruby_lang-pblished_at-eq-2014.html”的文件吗?
-
您的 CMS 支持自定义 URL 吗?
-
我添加了 cmets,查看更新。谢谢
-
文件真的是静态的还是按需生成的?只是您需要支持的特定 URL 还是某些 URL 方案?
标签: mod-rewrite nginx content-management-system static-pages