ThemeShaper Forums » Thematic

[closed]

link links from my subdirectory blog to site root -problem with URL

(3 posts)
  • Started 8 years ago by Bluesky
  • Latest reply from Bluesky
  • This topic is resolved
  1. Bluesky
    Member

    My blog is in a subdirectory
    www.mysite.com/blog
    My blog has a hardcoded menu to maintain the navigation on the all site. Viewers navigate inside the blog and can access the main site ( site home, about, editions etc...) from the menu.

    Today I see that Google shows Crawl Error for urls from my blog to my site root pages.

    Example of my hardcoded menu

    function add_menu() {
    { ?>
    
    <div id="menu">
    <ul id="cent">
    <li><a href="../../../../index.html">Home</a></li>
    <li><a href="../../../../editions.html">editions</a></li>
    <li><a href="../../../../about.html">about</a></li>
    </ul>
    </div>
    
    <?php }
    
    }
    add_action....etc...

    The URl problem comes out when pages are linked deeper from into the blog i.e : /category/tag...

    I feel there is a big mistake in my code...
    What should I do ?

    More generally, how do I write urls that link back to the root of my site from the blog?

    Thank you,

    Posted 8 years ago #
  2. have you given any thought to using a WP3.0 menu?

    but anyway, the problem is in your crazy, RELATIVE links. basically all those ../ say go up 4 levels from where you are right now and then find the editions.html file.... which as you've noticed doesn't work when you are deeper into the blog b/c then you need to go up MORE than 4 levels. where are those files? are they in the root of your site?

    maybe you could link like this:

    <a href="http://www.mysite.com/index.html">Home</a>
    Posted 8 years ago #
  3. Bluesky
    Member

    Yes, I guessed that levels were the problem. But I was not sure I could link directly to the root. I will do it this way.
    I will look the WP3 menu...I used a hardcoded menu to maintain my main site design.
    Thank you Helga !

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.