• Hi

    I would like to have a splash page before entering the wordpress homepage.

    So I have created a file, name it index.html
    The file has a link to enter wordpress – which links to index.php

    However this is not working how I expected …
    It seems that when it goes to https://www.website.com/blog/index.php

    It redirects/changes it to https://www.website.com/blog/
    (removing the index.php)

    Which then returns it to the splash page again (index.html)

    Does anyone know why this happens and if its possible to change the way this works. It needs to keep the index.php there.

    Thanks in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Maybe I’m wrong but I don’t think WP ever keeps the index.php.

    I think you are trying to create your splash page using the wrong method. Take a look at this.

    You shouldn’t create two index files in the same directory…there are lots of ways to do what you want, but maybe the simplest is to just name your splash page something other than index…maybe splash.html. That way if won’t conflict with the WP index.php file.

    Thread Starter wordpressmjb

    (@wordpressmjb)

    Thanks for your reply.

    I agree, there are lots of ways to do what I want, but this would have been the easiest.

    To have a file called “splash.html” means I have to code it to go to splash.html first and then also set a cookie or of some sort to say whether they have seen the splash page (so they don’t see it again).

    Its quite a bit of work considering I could have just used an index.html file and then for all wordpress homepage links, go to index.php as it should do.

    I could have just used an index.html file and then for all wordpress homepage links, go to index.php as it should do.

    I’ve never seen two index files work properly when in the same directory, so I’m not sure I would agree with your statement “…as it should do.” But then again, there is a lot I haven’t seen ??

    Thread Starter wordpressmjb

    (@wordpressmjb)

    Ok, this doesn’t seem to be going anywhere.

    index.php and index.html can be in the same directory.
    However that is not my concern!

    All I want to know is – how to stop WORDPRESS from removing the index.php from the URL address if going to https://www.website.com/blog/index.php EXAMPLE

    Does anyone know how to do this?
    OR point me in the right direction to where I can do this myself

    Thread Starter wordpressmjb

    (@wordpressmjb)

    bump

    I would like to pipe in here. Any file can be an index file if it is set up that way in the apache config or .htaccess file. So there is NOTHING wrong with having an index.html and an index.php in the same directory. If your DirectoryIndex states the order as: index.php index.html index.htm home.html then that will be the prioritized order every time. They are all independent pages and a direct call to any one of them will bring up that page. What WordPress does is rewrites domain.com/index.php to just domain.com/ If the index.html is ahead of index.php in priority, the site will display the index.html, not the WordPress index.php. It’s a pain if you have wordpress being developed behind the scenes while your index.html page is still there. The altermnative is to move the site, do the development, and move it back. I’m going to go through and find the redirect. My client wants both until he is done with his content.

    Steve

    (@stevejohnson)

    Go back to not using pretty permalinks. The behavior you’re describing is part of the rewrite functions of wordpress.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘index.php gets removed from URL’ is closed to new replies.