Mobile app version of vmapp.org
Login or Join
Lengel546

: How to upload a HTML file on server so that it displays like a webpage? The question is about uploading a file to a web server which could be accessed from a domain address and is not specific

@Lengel546

Posted in: #Html #Server

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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Lengel546

1 Comments

Sorted by latest first Latest Oldest Best

 

@Hamaas447

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

The URL 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 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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme