The Chillidog Software Blog

The ramblings of a developer

Home is where your index is

Have you ever looked at your site and wondered, "why aren't my changes showing up?" Well, in my experience, it can be one of two things in RapidWeaver:

  • RapidWeaver publishing cache not republishing properly
  • You have two index files.

Today, we are going to talk about the later. We will discuss how to identify multiple indices and how to fix it.

Help! My changes aren't showing up!

Okay, keep calm. First, let's try to access your site in two ways:

  1. With index.html
  2. With index.php

For example, with index.html, we would try to access your homepage like this:

http://www.example.com/index.html

Now, this page may or may not work. That is okay. Now, we will try the PHP version like so:

http://www.example.com/index.php

Again, this page may or may not work. If, however, both work, then you have a problem. You may even notice that one is correct and the other is not!

Why is my site showing up twice?

When RapidWeaver publishes your site, it often uses a .html file extension. When PHP is required, however, it will switch to use .php. This is required when a Stack or Plugin needs to use PHP.

RapidWeaver Page Inspector highlighting the filename field.

When you publish with RapidWeaver, RapidWeaver doesn't delete files on your server. It will only overwrite them. Therefore, you end up with an index.php and index.html file. In the web server world, the index.html and index.php files are special filenames that are assumed when you visit your site. For instance,

# By default, index.html or index.php is assumed here.
http://www.example.com/

Now, if an index.php and index.html file exists, the index.html is given priority. Therefore,

# If index.html and index.php exist, these two pages are the same.
http://www.example.com/
http://www.example.com/index.html

How do I fix this?

The fix is simple. You will need to log into your web host and, using their file manager, delete the index.php or index.html. The file to delete depends in which shows the incorrect version of your site. If index.html has the correct version, then delete index.php or vice versa. You may also use a FTP application if you prefer.

Now go forth and don't fall victim again to a misplaced index!

Your top dog, Greg