• I’ve just moved my blog to a new domain http://www.openobject.org/isop and the header link no longer resolves to the home url. Odd thing is all other internal links seem to work fine and the page source says it’s pointing to the correct url.

    I tried updating to WP 2.3.2 but the problem is still there. Anyone seen this before?

    thanks, Scott

Viewing 6 replies - 1 through 6 (of 6 total)
  • Scott,

    Actually, the link in your header is not pointing to the proper URL. Your header links to:

    http://www.openobject.org/isop

    when it should link to

    http://www.openobject.org/isop/

    Notice the trailing slash. Your server requires it to be there. When you click on the first link that I posted – your server redirects to:

    http://www.openobject.org/openobject/isop/

    Hope this helps,
    -Mike

    Thread Starter smitchell

    (@smitchell)

    Hi Mike, thanks for the quick reply.

    Your right, it’s the trailing slash that’s giving me the problems.

    The problem now is how do I get the trailing slash into the address, when I add it to the admin > options > wp address fields it doesn’t stick! (trailing slashes seem to get filtered out)

    (I also checked my .htaccess file but couldn’t find a redirect in there, maybe my host is adding it along with the domain pointing?).

    thanks for your time,
    Scott

    Scott,

    Hi. First thing to try is to add this code to your .htaccess above the auto generated wordpress code.

    # append "/" if requested URI contains no filetype and does not end in "/"
    ############################################################################
    RewriteCond %{REQUEST_URI} !(\.|/$)
    rewriterule (.+) http://your-domain.com/$1/ [R=301,L]

    If that fails for some reason, you could always just put the slash in there yourself in your theme’s header.php file:

    <a href="<?php bloginfo('url'); ?>/">

    Hope this helps,
    -Mike

    Post above [unspammed] from Akismet.

    Thread Starter smitchell

    (@smitchell)

    Ooooh, WordPress generates a .htaccess file? I didn’t know…

    and when I uploaded my site (instead of doing a standard install) this file was missing (my system wasn’t showing invisible files).

    I just uploaded the old .htaccess file (it has the trailing slash rewrite in it, just like you said) and it now appears to work!

    Thanks for your help
    – Scott

    hi mfields:

    You are very famous on WordPress for fixing header links. So today I’ve come to your rescue :).

    I’m trying to put the ARCHIVES link in the header http://509gossip.com/archives and I’m getting this error below:
    “404 – Not Found | Sorry, no posts matched your criteria.”.

    here is my code:
    ———————————————————-

    <div class="Menu">
     <ul>
      <li>
      <a class="<? echo (is_home())?'on':''; ?>" href="<?php echo get_option('home'); ?>/"><span>Home</span></a></li>
      <li><a <?php if (is_archive() || is_page('archives')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/archives/">Archives</a></li>
      <?php $pages = wp_list_pages('title_li=0'); ?>
     </ul>
    </div>

    ———————————————————-
    It looks like it’s not calling the archives.php file. Is it a path issue? Please help.

    Ken

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘My Header link doesn’t resolve’ is closed to new replies.