• Before I added WordPress to my website, I had a photo page (index) that linked to my primary page/website (main). Now that I’ve installed WP, I’m wondering if I can have the same set-up…a header page lead into my new WP index page, and if so, what can I name it so that the browsers will access it first?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Did you install WP into your root folder or into a sub-folder?

    If you installed WP in a sub-folder it is easy. Just put your photo page in the root folder and call it index.htm You will need to check your root folder .htaccess file to make sure index.htm is not being redirected to the location of your WP installation. If it is, remove that redirection.

    If you installed WP in the root folder, you will want to add this line into your root folder .htaccess file
    DirectoryIndex index.html index.htm index.php

    That is a directive to the Apache webserver used when someone types only https://domain.com in their browser – no specific file being requested. Apache goes down the list in order and serves the first file in the list it finds. As index.php is last in the list, index.html or index.htm, if they exist, will be served instead of index.php

    Thread Starter djrockwell

    (@djrockwell)

    The blog is in a subdirectory, but the blog index file is in the root. Will this fix still apply since I can’t put the photo page in the root and have it also named index? Can there be an index and an index2? Or another name that supdercedes index?

    yes, the files can have any name. I just used index in my examples since that is the typical name used.

    Apache directive doesn’t care what file names are in the list. It just goes down the list and serves up the first file in the list it finds, ignoring the rest.

    I just checked and it appears you can also list files in other folders. In other words, you should be able to say
    DirectoryIndex index.htm photos.htm /blog/index.php /photos/index.htm

    For anyone interested, the Apache page is here
    https://httpd.apache.org/docs/1.3/mod/mod_dir.html

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can I have a header page leading into my primary index page?’ is closed to new replies.