0

I am trying to host some non-WordPress content on the server that contains a WordPress installation. I put together a test of this by uploading the HTML5 Boilerplate index file - basically just a hello world HTML file (renamed to boilerplate.html) to a directory where I plan to place some other content.

Just to make sure I got the correct path, I ran the following on my server:

[host]$ pwd
/home/mrengy/mike-eng.com/files/prototype-pivot-pong
[host]$ ls
assets  boilerplate.html  index.html

http://mike-eng.com/files/prototype-pivot-pong/boilerplate.html is showing an "Oops. Sorry, but you are looking for something that is not here." error.

I also uploaded boilerplate.html to /home/mrengy/mike-eng.com/files/, and http://mike-eng.com/files/boilerplate.html - shows the "Hello world" content as expected.

How can I get WordPress to show the content of boilerplate.html (independently alongside the WP installation) under the "prototype-pivot-pong" directory and not show the Oops message?

(using WordPress 4.5.1)

  • Just to be clear, you want WP theme to show an HTML page? or you just want the HTML page to show independently alongside your WP installation? – bynicolas Aug 23 '16 at 17:37
  • @bynicolas I want the HTML page to show independently alongside the WP installation. – Mike Eng Aug 23 '16 at 20:02
1

I can see the index of /files directoy and prototype-pivot-pong/boilerplate.html doesn't exist. So, the 404 error is correct.

Also, you must know that, if the requested URL hits the directory of WordPress and it doesn't match a real file, the request will be handle by WordPress, at least you set your own RewriteRules in .htaccess above WordPress RewriteRules.

For example (not tested, just written here as sample):

RewriteRule ^files/prototype-pivot-pong/boilerplate\.html$ /files/index.php?file=boilerplate [L]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

EDIT

You say that the directory exists in your server but you can not access to it using browers. In that case, try to check permissions. If the directory and files are there and are accesible for public (for example, 755 for directory and 644 for files), they should be accesible in browsers. You can also contact with the support of hostihg company if the problem persists, I think it is not related with WordPress at all.

  • Yes, I noticed that about the index of the files directory when viewed through the browser. The directory exists though when I SSH using Terminal and do the following: [host]$ pwd /home/mrengy/mike-eng.com/files [host]$ ls boilerplate.html mike_eng_resume.pdf prototype-pivot-pong – Mike Eng Aug 23 '16 at 20:06
  • Try to check permissions then. If directory and files are there and are accesible for public, they should be accesible in browsers. You can also contact with the support of hosting company if the problem persists, it is not related with WordPress at all. Answer edited. – cybmeta Aug 23 '16 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.