WordPress.org

Ready to get started?Download WordPress

Forums

FTP issue (9 posts)

  1. MattyWP
    Member
    Posted 9 months ago #

    If I upload a file for example testpage.html to the root directory (where the wp is also installed) if I try to navigate to that location in my browser the HTML page does not show, I just get a wordpress 404 page.

    Is it possible to upload separate html files and have them functioning on the same domain as the wordpress install?

  2. leejosepho
    Member
    Posted 9 months ago #

    Yes: http://www.nnysandbox.net/maintenance.html

    And, you can even do that in a custom folder:
    http://www.nnysandbox.net/wp-maintenance/maintenance.html

  3. Diogo
    Member
    Posted 9 months ago #

    Hi Matty,

    Are using using Apache as web server? With Apache, WordPress will create a .htaccess in the installation directory and write some rules to it. The rules will tell how the webserver should serve files under that directory.

    The default .htaccess file looks something like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    You can check a line-by-line explanation of the rules to understand what it does.

    To access the file under root, you may need to create or modify some of the rules, but be careful! Those rules are essential to have pretty permalinks working.

  4. leejosepho
    Member
    Posted 9 months ago #

    I did not have to make any modifications there, but I do not know everything about all of that. And then for "Maintenance Mode", I just use this:

    # DIRECTORY INDEX FORCE INDEX.PHP
    ### select Normal Mode -or- Maintenance Mode
    ## Use index.php as default directory index file
    DirectoryIndex index.php index.html /index.php
    ## Use maintenance.html for Maintenance Mode
    #DirectoryIndex maintenance.html index.php /wp-maintenance/maintenance.html
  5. Diogo
    Member
    Posted 9 months ago #

    Yes.. you're correct, leejosepho. I wasn't clear.

    The default .htaccess file should allow direct access to any non-wordpress files under the directory. If your .htaccess is different than the default, you may need to make changes.

    Cheers!

  6. MattyWP
    Member
    Posted 9 months ago #

    Thanks for the reply's guys.

    Yes Diogo I am using Apache as web server however from looking at the link i'm still unsure what i'm changing.

    So what your saying is there's a rule thats stopping my html files being accessed?

  7. Diogo
    Member
    Posted 9 months ago #

    You're better not changing anything if you're unsure. It is safe to assume that if have never changed the .htaccess file it has the default rules in it, and those rules would allow access to the file.

    We can also look at file permissions. If your FTP client can change the file's permissions, try setting it as 644, or RW-R-R. This will give the owner (your ftp user) Read and Write permissions, and give Read only permission to everyone else.

  8. MattyWP
    Member
    Posted 9 months ago #

    permissions were already set at 644 so i'm still unable to use html files on the domain :(

  9. leejosepho
    Member
    Posted 9 months ago #

    Have you tried asking your host why you cannot get to an html file?

Reply

You must log in to post.

About this Topic

Tags

No tags yet.