Get Simple CMS - Restore and get 404 errors

GetSimple is a flat file CMS and very useful for small to medium sized web sites. It's also easy to restore sites to new servers, new Domains etc. But.... it is not uncommon that once restored, only the top level of the site works as expected. All the pages are present, but clicking on a top level menu generates a 404 even though the page is present.

Long story short, it's probably that you - or your software - did not restore the .htaccess file in the root directory, as often '.' files are bypassed by many backup/copying tools.

The last section of the file handles the rewrite rules for fancy urls, and with out this, you'll get 404 errors as the fancy urls don't work.

# handle rewrites for fancy urls
<IfModule mod_rewrite.c>
    RewriteEngine on

    # Usually RewriteBase is just '/', but
    # replace it with your subdirectory path
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
</IfModule>

The fix is to restore by hand from a backup or use a virgin version from a clean install.