Forums

typed correct URL, but got redirect to "404 page" (3 posts)

  1. feelexit
    Member
    Posted 2 years ago #

    I create an image folder, put a couple .php files and a few images there .

    if i type:

    xxxxxxx.com/images/test.jpg , image shows up.
    but if i type
    xxxxxxx.com/images/test.php , it redirects me to 404 page. file is there but just cannot be found.

    It must have something to do with my .htaccess file, I looked at it but couldn't figure out whats wrong. I paste it here, please help me out, thank you.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
  2. feelexit
    Member
    Posted 2 years ago #

    I notice one thing, if I chmod my images folder to 755, I dont have any problem loading all php files in that folder, but if I change it to "777", and check those php files will get me redirected to 404 page again.

    please help, this drive me crazy

  3. Shane G
    Member
    Posted 2 years ago #

    Hi,

    Check with these:

    -> assign wp-contents folder 766 recursive permissions.
    -> remove all unwanted codes from htaccess and add this code:

    # BEGIN WordPress

    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    -> Disable plugins and upgrade your wordpress to the latest version

    Thanks,

    Shane G.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags