HTML-Reloading web page takes me to main page - html

I am creating a website and hosting it myself via IIS. I am trying to traverse pages but it's not really working.
This is my code that will go to my "serivices" page. However, when on this page the URL does not change and when pressing reload I am taking back to the home page.
Our Services
So, for example, since my page is www.aasoftwaresolutions.com, when I click "Our Services" it should take me to www.aasoftwaresolutions.com/services.html. It doesn't do this. It will show the webpage but it will still have URL www.aasoftwaresolutions.com and when I press reload on the browser it takes me to the homepage rather than keeping me on services.
Here's my file structure:
F:\Website\ (base directory for website)
F:\Website\html\ (where all the HTML is)
Any ideas?

start directory:
it's for example: index.html
Our Services
the directory is here (for example).
F:\Website\ (base directory for website) \index.html
with this you are going to:
F:\Website(base directory for website)\html\services.html
with this ..\ stand back a folder ago.

Related

Issue with uploading website successfully to GitHub Pages

I'm having an issue with uploading my website to GitHub pages. I am a beginner and have just made my first website that uses several html files. I have created a repository for this website. The website contains index.html, and 2 other html files. When I first open the website through GitHub Pages it appears to be fine, however if I click on a link on the website which takes me to the main page (the main page being index.html) it opens up a completely different website from my other repository. I realised this is because it uses the same url (username.github.io/index.html) as my other repository. Since both of these are the same I guess it just opens up my other website because it was created earlier.
This is my first issue. I also have another issue. My other 2 html files have a unique html file name, but when I open the link for them I get a 404 error:
"The site configured at this address does not contain the requested file."
From what I understand, a GitHub Pages URL would look like this:
username.github.io/repository name/html file name.
My website looks fine when I open it with this URL:
username.github.io/repository name
However, when I click on any link on the website the URL loses it's repository name and changes into:
username.github.io/html file name which brings up a 404 error.
I don't understand why it does that.
The URLs in your links start with /, which points at the root of the domain.
Don't do that.

Browser shows contents of index.html instead of the actual website

I just created my portfolio website which I made with bootstrap studio 2 and made some edits to the file once I exported it. When I load my site on my local host it loads just fine. But after I uploaded it via ftp (filezilla) the page does not fully load only the html and the bootstrap css. Has anyone ever experienced this and is there a solution?
Here's what it looks like on the web host:
Here's what it looks like on localhost:
You're viewing the page through the file manager, so it just outputs the file content. You need to visit your index page through given (by your hosting) domain name (like yourdomain.hobohost.com/index.html).

Setting Up A Html Page On A Server

I am trying to learn how to set up a html page on a server, which i have done but an index page appears, I do not want this page to appear i would rather my home page to appear.
I am only learning how to do this so i have used a free web host.
web address: http://testingmyfreewebsite.comxa.com/
My file manager looks like this
The subPages and Css folders were created by me and they contain the css and other pages to my website.
i would really like to know how to remove the index page i am open to many methods.
There are three commonly used default page names that you can use on most web servers:
index.html
index.htm
default.htm (on some Windows servers)
It's a good idea to stick with index.html or index.htm on most servers, as default.htm is most often used on Windows servers, and isn't as common as it used to be.
If you're going to put other pages inside of folders (or directories) each folder should have an index.html inside of it as well if you're relying on the url to direct the user instead of hard coding it in.

I cant access html files from my document root

I have index.html in /var/www, which is my root document directory. I also have relevantskills.html in the same directory. The first link on index.html leads me to relevantskills.html. When I go to my website at http://brianhotopp.cf/ I can see index.html, and when I click on the first link, it displays relevantskills.html. However, when I try to access relevantskills.html from http://brianhotopp.cf/relevantskills.html, It brings me to index.html. Also I cannot view images in my root document directory. For example, I have a png called favicon, but when I go to mywebsite/favicon.png, it displays the default favicon for my domain name provider, not the one I have in /var/www. Is this a problem with my configuration? My permissions? Any help is appreciated, thanks.
Your website is running inside an iframe, that's why it is not working. When you're clicking on a link, your browser is not "redirected" but the website in the iframe is. That's also why you don't see any changes in the url bar on top of your browser.
I suppose you don't want to see your website inside an iframe. If this is the case, you better contact your hosting company because this is a dirty way of hosting websites.

How do I make a hyperlink go to a page on another website?

When creating the html files for my website, I had no problem understanding how to create links so that users could navigate between pages. For example, this worked fine to send someone to the about page:
ABOUT
I'm having issues upon uploading the html files to my web server.
How, do I get About link to send the user to: www.blahblahblah.com/about ?
My landing page has been renamed index.html.
You need to add http:// in the href to go to a page on an external site:
About page on blahblahblah.com
This is because when you simply link to it without the http:// in front (hyper text transfer protocol) it is trying to go to the page "www.blahblahblah.com" which obviously does not eixst on your server. When you add the http://, the browser knows that it is another website and therefore will bring you to the external site.
Your web server will be configured with a "document root" directory. Usually this is the directory where index.html is located. Place your about.html in the same directory, and the link you provided will link to it if it is served from the same URL-path (that is to say, it's not in a sub-folder). If your files are indeed in the document root, you may prefix your link href attributes with a forward-slash, which indicates that the path is relative to the document root.
As noted in the previous comment, this technique only works for pages hosted in the same directory as each other, on the same host. If the files are in different directories, you must start with the slash, and if they are on different hosts, you must include the full domain and path.
This is what he meant:
<input type="button" value="SampleText" onClick="window.location='http://www.blahblahblah.com/about';">
and this will open it in a new window:
<input type="button" value="SampleText" onclick="window.location='http://www.blahblahblah.com/about';" target="_blank">