从站点获取 URL 列表 [英] Get a list of URLs from a site

查看:32
本文介绍了从站点获取 URL 列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为客户部署替代站点,但他们不希望所有旧页面都以 404 结尾.保留旧的 URL 结构是不可能的,因为它太可怕了.

I'm deploying a replacement site for a client but they don't want all their old pages to end in 404s. Keeping the old URL structure wasn't possible because it was hideous.

所以我正在编写一个 404 处理程序,它应该查找正在请求的旧页面并永久重定向到新页面.问题是,我需要所有旧页面 URL 的列表.

So I'm writing a 404 handler that should look for an old page being requested and do a permanent redirect to the new page. Problem is, I need a list of all the old page URLs.

我可以手动执行此操作,但如果有任何应用程序可以为我提供相关(例如:/page/path,而不是 http:/.../page/path)URL 列表,我会很感兴趣给出主页.就像一只蜘蛛,但除了寻找更深层次的页面外,它并不关心内容.

I could do this manually, but I'd be interested if there are any apps that would provide me a list of relative (eg: /page/path, not http:/.../page/path) URLs just given the home page. Like a spider but one that doesn't care about the content other than to find deeper pages.

推荐答案

我不是想回答我自己的问题,但我只是想运行一个站点地图生成器.我发现的第一个 http://www.xml-sitemaps.com 有一个不错的文本输出.非常适合我的需求.

I didn't mean to answer my own question but I just thought about running a sitemap generator. First one I found http://www.xml-sitemaps.com has a nice text output. Perfect for my needs.

这篇关于从站点获取 URL 列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆