Sunday, November 21, 2010

How do I direct to files backwards through html?

What I mean is this: Lets say I have an index.html. It is in a folder called Website. In that folder there is another folder called Errors, for error pages. In the Errors folder I have an error1.html, and somehow I want to make a link that goes to index.html. How do i do that?How do I direct to files backwards through html?
Use ';../'; in front of folder name as many times as you want to go back (up) in directory.



RonHow do I direct to files backwards through html?
Well... first, your Index.html file is your root so it should not be within any site folder which means your Website itself is named www.Website.com.



On that Website you have a folder named Errors. It is best to keyword target your folder names, thus if your Website is not working with errors in some way I would rename it to be consistent with your niche. Same goes for files within your folders.



Given that your niche is ';errors'; we have the file name ';error1.html'; so that would look like this as a URL.

===%26gt; http://Website.com/Errors/error1.html (or htm, it really doesn't matter.)



On that page you have the word ';HOME'; which will send you back to index.html.



There are a couple of options here.



You could reference ';HOME'; using external indicators which would look like...

%26lt;A HREF=';http://index.html';%26gt;HOME%26lt;/A%26gt;

The good of this idea is that you have in a sense created your own external link internally. Search engines like external links coming to your site as long as they can believe that they have not been tricked. Thus I would not do this all the time, but from time to time it should be okay.



You could reference ';HOME'; as an internal link and that would look like this.

%26lt;a href=';../index.htm';%26gt;Home%26lt;/A%26gt;

Since it is best to link all pages together within your Website and especially back to the root index page this is a good strategy to use for optimization.



Hope that helps



The Body By Chocolates Man

Where chocolate recipes are hot

===%26gt; http://BodyByChocolates.com

Also tweet me on Twitter at

===%26gt; http://Twitter.com/BodyByChocolate

No comments:

Post a Comment