Jump to content
Killersites Community
webmanz

Ch4 L8 web directory paths

Recommended Posts

Everything worked out just fine for me as per the video's objectives.

However, I would like to know why,when I am here:     root/sub-pages/my-friends.html

and I click 'my plans' or 'my work', it doesn't work.

The directory path for these is within subpages folder, but when I look in subpages they are not there but rather in root dir.

Q: How do we click my plans and my work from within root/sub-pages/my-friends.html

and get them to work? Within Sublime my-friend.html  tab I tried coding:   ../my-website/my-plans.html      but to no avail.

 

<!doctype html>
<html>
     <head>
          <title>Friends page</title>
     </head>
<body>
	<p>Welcome to my personal <a href="../sub-pages/index.html"> home page.</a></p>
	<hr>
	<h1> Friends Page</h1>
	<p>Check out a list of <a href="my-friends.html">my friends.</a></p>
	<p>Check out a list of <a href="../my-website/my-plans.html">my plans.</a></p>
	<p>Check out a list of <a href="../my-website/my-work.html">my works.</a></p>
	</body>
</html>
Edited by webmanz

Share this post


Link to post
Share on other sites

I don't really get your folder structure but I suggest somesting like this:

ROOT
  index.html
SUBPAGES
  my-friends.html
  my-plans.html
  my-work.html

Then your my-friends.html should look like this:

<!doctype html>
<html>
     <head>
          <title>Friends page</title>
     </head>
<body>
	<p>Welcome to my personal <a href="../index.html"> home page.</a></p>
	<hr>
	<h1> Friends Page</h1>
	<p>Check out a list of <a href="">my friends.</a></p>
	<p>Check out a list of <a href="my-plans.html">my plans.</a></p>
	<p>Check out a list of <a href="my-work.html">my works.</a></p>
	</body>
</html>

And your index.html like this:

 

<!doctype html>
<html>
     <head>
          <title>Friends page</title>
     </head>
<body>
	<p>Welcome to my personal <a href="#"> home page.</a></p>
	<hr>
	<h1> Friends Page</h1>
	<p>Check out a list of <a href="subpages/my-friends.html">my friends.</a></p>
	<p>Check out a list of <a href="subpages/my-plans.html">my plans.</a></p>
	<p>Check out a list of <a href="subpages/my-work.html">my works.</a></p>
	</body>
</html>

 

 

Edited by Bake76

Share this post


Link to post
Share on other sites

Hmm, I can't post formatted code. When I try I always get this error:

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request

Share this post


Link to post
Share on other sites

Pnf8LF.png

Share this post


Link to post
Share on other sites

Yes, that's what I meant.

When I use the coding block I get this error. The code shows up in my post but I can't submit it.
I also can't edit it, then I get this error:
"There was a problem loading this content"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×