用于内部 URL 缩短和重定向的软件
我想为我们的研究实验室构建一个内部 url 服务,您可以在其中创建自定义 url 并通过简单地
lab/<my-url>
在地址栏中键入来引用它们。 (这只能在本地网络上访问)
例如,要链接到午餐订单的某些电子表格,可以创建一个网址:
lab/lunch
这个问题有两个部分:
- 如何在不影响正常互联网流量的情况下进行网址重定向?
- 我可以使用现有的软件来管理域名吗?
I want to build an internal url service for our research lab where you can create custom urls and reference them by simply typing
lab/<my-url>
in the address bar. (This would ONLY be accessible on the local network)
For instance, to link to some spreadsheet for lunch orders, one could create a url:
lab/lunch
This question has two parts:
- How do I go about doing the url redirection without affecting normal internet traffic?
- Are there existing software I can use for the management of the domain names?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您可以控制网络上的计算机,则可以修改它们的
hosts
文件。 Wikipedia 有此文件的位置列表。您可以为 < code>lab 转到托管此快捷方式系统的服务器,然后设置一些用于重定向的软件。这将完全避免与 DNS 发生冲突,但它只能在正确设置新
hosts
文件的系统上运行。至于实际设置执行重定向的服务器,我不知道有什么软件。在 Ruby on Rails 中这将相当简单,具体取决于您的经验水平。
If you have control over the computers on your network, you could modify their
hosts
file. Wikipedia has a list of locations for this file.You could set up a mapping for
lab
to go to the server that's hosting this shortcut system, and then set up some software for redirecting there. That would avoid having to mess around with DNS at all, but it would only work on systems that have the newhosts
file set up properly.As for actually setting up the server that does the redirection, I don't know of any software off the top of my head. It would be fairly simple to do in Ruby on Rails, depending on your experience level.