lighttpd url 重写到子域
lighttpd 重写如何进行以下工作?
http://example.com/file_46634643.jpg
到 http://sub.domain.com/46634643.jpg
如果可能的话...
How does the lighttpd rewrite work for folowing?
http://example.com/file_46634643.jpg
to http://sub.domain.com/46634643.jpg
If it's possible...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对的,这是可能的。 使用 mod_rewrite,这里是一个示例:
查看 Lighttpd 的 mod_rewrite 文档 了解更多详细信息。
Yes, it is possible. Use mod_rewrite, here is an example:
Check Lighttpd's mod_rewrite documentation for more details.
我不认为 mod_rewrite 允许您“重写”到另一个(子)域。 您可以使用 mod_redirect (但它是重定向,而不是重写)。 这是 Bartosz 答案的稍微修改版本:
检查 http://redmine.lighttpd.net/ wiki/lighttpd/Docs:ModRedirect
I don't think mod_rewrite allows you to "rewrite" to another (sub)domain. You could use mod_redirect (but it's a redirect, not a rewrite). Here is a slightly modified version of Bartosz's answer:
Check http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModRedirect