Page 1 of 3

Migrate site.html to CMSimple_XH

Posted: Wed Oct 24, 2018 5:15 am
by Korwin
I have a few old sites on pure html, with pages having an extension httр://sitename/page.html for example http://urql.ru
I want to move them to CMSimple_XH.
Tell me how to do it, so as not to lose positions in the search engines?
The best of those sites has over 300 pages and about 400 visitors per day.

Understand correctly, I do not ask how to transfer the content of the site, although for 300 pages it is a bit tedious. I don't understand how search engines and links from other pages will find new pages. Is redirect 301 the only way?

Re: Migrate site.html to CMSimple_XH

Posted: Wed Oct 24, 2018 6:29 am
by Tata
I am affraid that the only way is:
1. Build a template for new page with all necessary CMSimple_XH v.1.5.9 calls.
2. Replace the content and check, how the webpage will handle it.
If the content, navigation etc. is OK, install the exchange and follow viewtopic.php?f=16&t=14070&p=67729&hili ... 5.9#p67729
Other way is really more difficult (time consuming):
1. as above
2. Transfer everything page-by-page, incl. all images and linked documents etc.

If you run any local server, you don't need the portable_xh. Hre you can skip the step 1a.

Re: Migrate site.html to CMSimple_XH

Posted: Wed Oct 24, 2018 8:04 am
by Korwin
Tata wrote:
Wed Oct 24, 2018 6:29 am
I am affraid that the only way is:
1. Build a template for new page with all necessary CMSimple_XH v.1.5.9 calls.
2. Replace the content and check, how the webpage will handle it.
If the content, navigation etc. is OK, install the exchange and follow viewtopic.php?f=16&t=14070&p=67729&hili ... 5.9#p67729
Other way is really more difficult (time consuming):
1. as above
2. Transfer everything page-by-page, incl. all images and linked documents etc.

If you run any local server, you don't need the portable_xh. Hre you can skip the step 1a.
Why CMSimple_XH v.1.5.9?

Re: Migrate site.html to CMSimple_XH

Posted: Wed Oct 24, 2018 8:12 am
by Tata
Because it was the latest version working with a simple content.htm and pagedata files.
But the manual linked in my previous post is safer.

Re: Migrate site.html to CMSimple_XH

Posted: Wed Oct 24, 2018 9:55 am
by olape
Korwin wrote:
Wed Oct 24, 2018 5:15 am
Understand correctly, I do not ask how to transfer the content of the site, although for 300 pages it is a bit tedious. I don't understand how search engines and links from other pages will find new pages. Is redirect 301 the only way?
Yes, redirect with 301 is the only way.
Otherwise, you'll have to wait until the rankings settle down again alone. But there are still favorites and links.

You can use moved_xh (viewtopic.php?f=16&t=13148&hilit=moved_xh) or .htaccess with mod_rewrite.

Re: Migrate site.html to CMSimple_XH

Posted: Wed Oct 24, 2018 10:45 am
by Tata
But this - if I understand it correctly - won't change the way how the page is edited. IOW, it won't be CMSimpe_XH website and all pages would need to be edited internally without using features of CMSimple_XH.

Re: Migrate site.html to CMSimple_XH

Posted: Wed Oct 24, 2018 10:56 am
by olape
Tata wrote:
Wed Oct 24, 2018 10:45 am
But this - if I understand it correctly - won't change the way how the page is edited. IOW, it won't be CMSimpe_XH website and all pages would need to be edited internally without using features of CMSimple_XH.
He has a simple website, no CMS or similar, blank html, and wants to create this new with XH, but wants to keep ranking and links.
Korwin wrote:
Wed Oct 24, 2018 5:15 am
Understand correctly, I do not ask how to transfer the content of the site, although for 300 pages it is a bit tedious. I don't understand how search engines and links from other pages will find new pages. Is redirect 301 the only way?

Re: Migrate site.html to CMSimple_XH

Posted: Wed Oct 24, 2018 11:38 am
by cmb
olape wrote:
Wed Oct 24, 2018 9:55 am
You can use moved_xh (viewtopic.php?f=16&t=13148&hilit=moved_xh) or .htaccess with mod_rewrite.
Moved_XH doesn't work in this case, because it will not even see URLs like httр://sitename/page.html. .htaccess with mod_rewrite is the way to go for Apache; some other form of URL rewriting for other servers (see, for instance, this article for NginX).

Re: Migrate site.html to CMSimple_XH

Posted: Wed Oct 24, 2018 11:56 am
by cmb
Korwin wrote:
Wed Oct 24, 2018 5:15 am
Understand correctly, I do not ask how to transfer the content of the site, although for 300 pages it is a bit tedious.
Still, some tip (might be useful for others as well): since CMSimple_XH's content file (content/content.htm) is basically a real HTML file, it is pretty simple to convert the contents of a plain HTML site to CMSimple_XH 1.7. Basically, you even use the following minimal content/content.htm:

Code: Select all

<html><head><title>Content-Datei</title>
</head><body>
<!--XH_ml1:Start-->
<p>blah</p>
</body>
</html>
The HTML comment has the menu level (XH_ml1 means menu level 1, XH_ml2 means menu level 2, etc.), and the name of the page (“Start” in this case). The <p>blah</p> is the contents of the page.

So it's possible to build content.htm manually, maybe supported by some tools. A simple bash or PHP script could traverse the existing directory structure of the existing Website, write the respective HTML comment, and `tidy --show-body-only` could be used to extract the contents of the body of the page, and append it to content.htm. Some more tweaks are necessary (for instance, to retrieve the meta keywords and descriptions, and perhaps to adjusts image paths etc.)

Re: Migrate site.html to CMSimple_XH

Posted: Wed Oct 24, 2018 12:46 pm
by Korwin
Tata wrote:
Wed Oct 24, 2018 10:45 am
But this - if I understand it correctly - won't change the way how the page is edited. IOW, it won't be CMSimpe_XH website and all pages would need to be edited internally without using features of CMSimple_XH.
Just the opposite, I intend to copy the pages through the built-in editor CMSimple_XH, (Ctrl-C => Ctrl-V) and then fix the code a bit in content.html

It is very sad not to be a programmer and to do with hands what the script should do. Alas, while I do not know how.

One more question:
All html pages are in my root site and have readable URLs in English (and the pages in Russian, of course). For example: http://urql.ru/indetermine_games_consept.html
Can I save these URLs when creating pages in CMSimple_XH, for example in this form:
http://urql.ru/?indetermine_games_consept so that there is one redirect rule, and not its own for each page?
I see a problem in that the menu displays English urls, not Russian text. Is it possible to fix this or is it easier to make one redirect to each page?