I have a folder on a hosted web server that has an index.html file within it, when I type the URL into the browser along with the index.html the page appears fine like this:
http://www.mywebsite.com/subfolder/index.html
however when I type the URL below the page displays but not properly:
http://www.mywebsite.com/subfolder
If I type the second URL without the index.html should the browser not default to the index page?
Any help would be awesome.
It must be taking index.html by default.
As .htaccess file is defined index.html as the default file.
I checked both the links and both have given the same output.
Can you please check again?
Related
Sorry if this isn't the appropriate place to ask this question, as it doesn't pertain directly to code, but I haven't found any help anywhere else.
So I've created a temporary landing page for my website that's just an .html file. I've uploaded it onto the host's public_html directory. In order to access that page I need to go to example.com/test.html. However, I'd like to be able to access that page by just going to example.com.
You can do this by adding this content to .htaccess file in public_html directory
RewriteEngine On
DirectoryIndex test.html
replace test.html with your file name
it's entry page, for whole entry pages, you should use naming index.html, rename your page to index.html
I have a page called en.md and another page called ko.md in a directory. Both files have custom-set permalinks, so en.md and ko.md respectively are not a part of the page URL. Regardless of this setting, to move from en.md to ko.md in normal HTML, all I would need to do is this :
Move to File KO
However, this doesn't seem to work in Jekyll; this link sends me straight to URL .../ko.md, where there is no file (because of that permalink setting), rendering my link unusable. Is there a way to link to a specific file instead of just permalinks in Jekyll-processed HTML? Thank you!
How can I place/name an "intro" page before my index.html so the server reads it first?
That page is not a loader page, it simply has a video with a button for entering the website that Is connected to my homepage which is index.html
(I also wouldn't want to be changing the location of my homepage at this point and turn the video into the index.html which seems to be one option.)
Do you guys have any tips? Thanks!
In an apache server environment create a .htaccess file and place the following code in it:
DirectoryIndex intro.html index.html index.php
Where intro.html is the first page you want to show.
I've just got my website up and when I only type in the domain I get an Index of all the files that I've uploaded, but I want it to load my HTML page when it gets loaded as www.domain.com/domain.html instead I want it to be www.domain.com.
How do I do this? Do I have to contact my hosters or can I do this in the project?
As long as the web server doesn't use wacky configuration, you can just name the main file "index.html" and it will be the main access point to your domain.
Please keep index.html file in top level directory of application. If you do not have index.html file then add new file in top level directory and redirect it using onLoad function to your website home page.
All you have to do is to rename domain.html to index.html and it will be displayed automatically when the site loads.
That is the main page you wish to display when someone visits www.domain.com should be named index.html if it is an html page, if not you use the correct file extension.
A way to keep using domain.html as the main source file. Create an index.html file and add the following code in it.
<script>
setTimeout(function(){
window.location='domain.html';
}, 5000);
</script>
I have made my first website and in the preview in Safari and Chrome from Dreamweaver it works fine. But after uploading my files with Filezilla to 000webhost and typing in the URL, only the index page loads, links to other pages on the site don't work, images are broken and the css isn't applied.
I'm think it is because I haven't named the files correctly in the code, but I have no idea what to call them in order to get it right.
The file you upload to is public_html. So I've tried http://www.webaddress/public_html/Pages/entertainment.html but it didn't change anything.
Thanks for any help!
Without code examples it's very difficult to answer this, but it's probably just that your URL format is incorrect.
For example, if you've got example.com/example/example.html and that page contains a CSS file with a location of /css/style.css, the web browser will look for example.com/css/style.css because the slash at the beginning of the URL tells it to go to the root.
In this case, your CSS file is probably actually in example.com/example/css/style.css. Remove the beginning slash so the location is css/style.css and the web browser will look for the file using the current page's location as it's starting point.