【发布时间】:2014-08-27 07:52:28
【问题描述】:
我的提要阅读器使用像 http://example.com/feed/feeds.bbci.co.uk/news/technology/rss.xml 这样的 URL。此 URL 显示来自 http://feeds.bbci.co.uk/news/technology/rss.xml 的内容。
我最近添加了一个分页功能,将/page/123 附加到 URL 的末尾。例如,BBC 提要的第 2 页将是 http://example.com/feed/feeds.bbci.co.uk/news/technology/rss.xml/page/2。
但是,某些提要 URL 以斜杠结尾,例如 http://news.yahoo.com/news/。此提要的第 2 页将是 http://example.com/feed/news.yahoo.com/news//page/2。这个双斜线不好吗?任何浏览器都会忽略双斜杠并请求http://example.com/feed/news.yahoo.com/news/page/2吗? http://example.com/feed/news.yahoo.com/news/page/2 返回 404 未找到。
附:我正在使用 Apache 的重写模块将所有请求发送到处理重写的 PHP 脚本。
【问题讨论】:
-
是的。它会起作用的。例如,在 Firefox 上,url 可能看起来像:“google.com//page//2”
标签: apache url browser rewrite