Moved_XH—a CMSimple_XH Plugin

Plugin Icon

Moved_XH facilitates to cater for pages which have been renamed. Direkt links to those pages will normally result in a 404 Page Not Found error, but Moved_XH makes it possible to redirect incoming requests to another page or to flag them as gone. Appropriate information is returned that informs bots about the change, what is particularly important regarding search engines, which can change the URL of the page resp. remove it from the index.

Please do read this documentation, before you encounter any problems!

Important Notice

Moved_XH couldn't be tested so far in various environments. It is a so called BETA version. Use with caution!

Requirements

Moved_XH is a plugin for CMSimple_XH ≥ 1.5.

Installation

The installation is done as with many other CMSimple_XH plugins. See the CMSimple_XH wiki for further details.

  1. Backup the data on your server.
  2. Unzip the distribution on your computer.
  3. Upload the whole directory moved/ to your server into CMSimple_XH's plugins directory.
  4. Set write permissions to the subdirectory languages/ and the plugin's content folders (/content/moved/).
  5. Switch to "Moved" in the back-end to check if all requirements are fulfilled.
  6. If you want to have the appropriate messages for redirected and removed pages in CMSimple_XH < 1.5.8, you have to edit cmsimple/cms.php. Look for function shead(), and replace:
        $title = $tx['error'][$s];
    with:
        if (!isset($title)) {
            $title = $tx['error'][$s];
        }

Settings

The plugin's configuration is done as with many other CMSimple_XH plugins in the website's back-end. Select "Moved" from "Plugins".

Localization is done in "Language". You can translate the character strings to your own language, or customize them according to your needs.

Usage

Moved_XH stores its data separately for each language resp. subsite of the CMSimple_XH installation in a subfolder moved/ of the respective content/ folder. The rules regarding the renamed pages are stored in data.csv; incoming requests to pages that do not exist and do not have a rule in data.csv are logged in log.csv.

The rules can be edited in the plugin administration under "Main Settings". Each line of the file constitutes a rule. Rules consist of one resp. two so called page URLs. Technically speaking, a page URL is the name of the first parameter of the query string, i.e. everything between the question mark (?) and the first ampersand (&) resp. the end of the URL, if there's no ampersand. It is recommended to copy the page URLs from the address bar of the browser instead of entering them manually, because there'll be some surprises. For instance, the page URL of the fictious page Fahrvergnügen is Fahrvergn%C3%BCgen and not Fahrvergnügen as one might expect.

There are two different types of rules:

Redirects

Redirect rules will redirect incoming requests for an old page URL to a new page URL or an external URL (which has to be fully qualified, i.e. starting with the protocol, e.g. http://). Both URLs are seperated by an equal sign (=).

Example

You are restructuring your site and want to move the toplevel page "Oaks" to the second level below "Trees", so add the following rule:

Oaks=Trees:Oaks
Example

You have moved the page "Oaks" to another CMSimple_XH installation, so add the following rule:

Oaks=http://www.example.com/trees/?Oaks
Example

You have upgraded from an ISO-8859-1 encoded CMSimple version to a UTF-8 encoded CMSimple_XH installation, and you have a page "Fahrvergnügen", so add the following rule:

Fahrverg%FCgen=Fahrvergn%C3%BCgen
Gone

Gone rules will inform visitors that a page does not exists anymore. They consist of the page URL of the removed page.

Example

You have removed the page "Temporary Information" because it is no more needed, so add the following rule:

Temporary_Information

The log files are useful to check if there have been requests to pages which do not exist. Each line of the log file contains the timestamp of the request and the requested page URL; if available the referrer is logged also. Currently it is not possible to view the log files from the plugin administration; you have to download it via FTP. You may consider importing the log files to a spread sheet application for an better overview.

Limitations

License

Moved_XH is licensed under GPLv3.

© 2013 Christoph M. Becker

Credits

The plugin icon is designed by World Media Group LLC. Many thanks for publishing this icon under a liberal license.

This plugin uses free applications icons from Aha-Soft. Many thanks for making these icons freely available.

Many thanks to the community at the CMSimple_XH forum for tips, suggestions and testing.

And last but not least many thanks to Peter Harteg, the "father" of CMSimple, and to all developers of CMSimple_XH without whom this amazing CMS wouldn't exist.