Cannot get path correct on .load()

Cannot get path correct on .load()

I'm trying to use the .load() method of jQuery. On my index page, I have the following:

  1.     $(function () {
            $("#mainContent").load("views/pageone.html");
        });

It loads fine and my url looks like this (http://localhost:50715/website1/index.html). Index.html is at my root and all other pages are under a folder structure.

Now, after it is loaded, looking at the contents of my pageone.html, I also have a load method:

  1.     $(function () {
            $("#mainContent").load("views/pagetwo.html");
        });

I get a 404 and I see in the url it is because it is trying to load pagetwo.html at the root:

  1.     http://localhost:50715/website1/pagetwo.html

I'd like to keep my pages in a folder structure, but so far, I cannot load them if they are not at the root. Please help. What am I doing wrong or what I do not understand?