1

The question is about uploading a file to a web server which could be accessed from a domain address and is not specific to WordPress only.

My server runs WordPress, so there's a japanaddicts.org directory in the root space. Now, I created a sub-domain through my hosting provider. The address is paperwork.japanaddicts.org

I checked through FTP, and saw that a directory named the same has been created. When I open it, then the htaccess folder, and add my paperwork.html file (with an embedded stylesheet), it doesn't work properly.

When I open paperwork.japanaddicts.org, it opens a directory listing, which is fine for a rudimentary start. But after opening the paperwork file, paperwork.japanaddicts.org/paperwork, it opens the html file, instead of parsing the code within.

Please advise on how to make that page view as a webpage with all the styles.

1

Thanks for posting the real FQDN; loading the actual page tells me right away what the issue is.

The URL http://paperwork.japanaddicts.org/paperwork is not actually serving index.html from a directory, it is serving a file in the document root called paperwork. Since there is no file extension for the server to determine MIME type, it is being served as text/plain. You can verify this by going to http://paperwork.japanaddicts.org/paperwork/index.html.

You can use various server configuration settings to serve the file at the URI of your choice, or change the filename to paperwork.html. You can even add paperwork to the web server's MIME types. But the simplest solution is to create a directory called paperwork, put your HTML file inside it, and rename the file to index.html. Then you can browse to the first URL above as mentioned in the question.

|improve this answer|||||
  • THANKS A LOT! That worked, I renamed it to index.html. Now I remember that yeah, the first thing a browser looks for is a index database. Thanks, and I don't think I'm intelligent enough to comprehend the meaning of MIME types, but maybe later I'll do that. – Abhimanyu Jul 11 '14 at 6:09

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.