• Resolved zuzwha

    (@zuzwha)


    Hello,
    I have 3 files: index.php, style.css and 404.php
    When I want to access to http://localhost/wordpress/index.php,
    a content in 404.php is displayed.
    I dont know if it is a normal behaviour but I tried to save permalinks, delete cache in browser and also I think no problem with .htaccess.
    So my question is why I can see content of 404.php instead of index.php?

    • This topic was modified 2 years, 6 months ago by James Huff. Reason: moved to Localhost Installs since this is a localhost install
Viewing 3 replies - 1 through 3 (of 3 total)
  • Afzaal

    (@afzaalsikander)

    Take a backup of 404 page then delete the page.
    Try the URL with index page.
    If same 404 page content is showing up then change you index.php content that may have same code like 404 page.

    Thread Starter zuzwha

    (@zuzwha)

    thank you for your answer. I tried it. When I delete 404 page. I can see normally index page. So maybe problem is in .htaccess. I would like to see index.php when I want to access to http://localhost/wordpress/index.php and 404.php when I access to for example http://localhost/wordpress/shfdk

    My .htaccess looks:

    `DirectoryIndex index.html index.php
    ErrorDocument 404 /errs/404.php

    ## Can be commented out if causes errors, see notes above.
    Options +FollowSymLinks

    #
    # mod_rewrite in use

    RewriteEngine On

    # BEGIN WordPress
    # The directives (lines) between “BEGIN WordPress” and “END WordPress” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/index.php
    RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
    RewriteRule (.*) index.php
    RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

    …and still I can see 404.php instead of index.php when I access to http://localhost/wordpress/index.php

    Thread Starter zuzwha

    (@zuzwha)

    well now it is working 🙂
    in adminer Ive edited in wp_options first two lines: site URL and home

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘404.php is displayed instead of index.php’ is closed to new replies.