• Justin Case

    (@the-buddha-garden)


    Hey all:

    For some reason, there are some links out there that have /index.html appended to our site URL, and people get our 404 page when they click on them, such as:

    www.example.com/index.html

    Whats the best way for them to just get the wordpress homepage at:

    www.example.com/

    If you could supply the redirect code for the .htaccess file, I would be much obliged.

    Also, will there be any problems if I do that redirect? Are there times when wordpress NEEDS to have index.html appended to the URL?

    Thanks in advance.

    BTW: In the Reading Settings, we have Front page displays: A Static Page. Is that what is causing the problem?

    We are using Divi / elegant themes and – as far as I can tell – you need to use a static page to use the various elegant them built in modules.

Viewing 1 replies (of 1 total)
  • Thread Starter Justin Case

    (@the-buddha-garden)

    Ok, I think I may have found it. But I would still like to know if doing this is going to cause any problems:

    RewriteCond %{THE_REQUEST} ^.*/index\.html
    RewriteRule ^(.*)index.html$ https://www.yourdomain.com/$1 [R=301,L]

    Just let me know if this is a bad thing or not…

Viewing 1 replies (of 1 total)
  • The topic ‘Getting 404 Page When index.html is in URL’ is closed to new replies.