Веб-сканер с опцией конвертировать ссылки

273
qballer

Я хотел бы сканировать резервную копию сайта, к которому я потерял доступ. Резервное копирование сайта осуществляется на subdomain.somesite.com, а ссылки на веб-странице - www.subdomain.com.

это приводит к следующей ситуации:

ссылка http://subdomain.somesite.com/?page_id=number работает, но ссылка в настоящем html - http://www.subdomain.com/?page_id=number и не работает.

Любые идеи, как сделать это без написания специального сканера?

У меня есть доступ к www.subdomain.com, который находится на вершине WordPress. Одна идея состоит в том, чтобы перенаправить все страницы с шаблоном /? Page_id = номер.

Пример. http://www.subdomain.com/?page_id=255 приведет к http: //subdomain.somedomain/? page_id = 255

1

2 ответа на вопрос

1
Martin

If your problem is about redirecting requests from www.subdomain to subdomain.somedomain, you can simple use RewriteRule in Apache or similar implementations in other webservers. You can use the proxy parameter P to serve the site from the www. domain and let the webserver fetch it from the backup site on the fly.

If you want to crawl and modify the content, the easiest solution would be using wget with the mirror option (availible on Linux, Windows...). It may be sufficient to use the inbuilt functions to convert absolute links to relative links. Otherwise just use a search and replace tool or regular expression to modify the domain in the downloaded folder.

0
Schwertspize

gnu wget can do it. the option -r is for recursive download, -k converts the links. see the manpage for more information

Похожие вопросы