Skip to content

Login URL doesn't work 404

Robert Isoski edited this page Jan 7, 2020 · 5 revisions

How to fix "Sorry, page not found" when visiting login URL and some other URLs

There are 5 files when you unzip WonderCMS and one of them is a file called .htaccess (notice the dot in the name).

On some systems, files that start their name with a dot are hidden and can't be copied. To make WonderCMS work, you have two options. Either (1) enable the visibility of hidden files on your computer OR (2) manually create a .htaccess file on your server.

Fix 1: enable visibility of hidden files on your computer

OR Fix 2: Manually create a .htaccess file on your server (or edit an existing one) with the content below

Options -Indexes
ServerSignature Off
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA,L]
RewriteRule database.js - [F]
RewriteRule cache.json - [F]

After applying either of these fixes, all URLs should be working properly.

Why is .htaccess necessary?

.htaccess is a server file that servers multiple purposes:

  1. Prevents access to database.js.
  2. Creates clean URLS.
    • example.com/index.php?page=home becomes example.com/home
  3. Disables server signature.
  4. Disables directory and files listing.
Clone this wiki locally