Support » Fixing WordPress » localhost WAMP install: trying to link to blog’s root (end up at localhost root)

  • This problem is probably really simple to solve with one extra line in my .htaccess (RewriteBase? BaseHREF??). I’ve spent about an hour Google searching for an answer and had no joy. Can anyone see where I’m going wrong please?

    I have set-up a localhost (WAMP) install of WordPress 2.9.2 at:


    I have enabled pretty permalinks and they are working fine

    In the future I hope to put this site live online

    rather than using absolute URLS
    [a href=””]
    I was trying to use
    [a href=”/images/test.jpg”]

    but this latter URL doesn’t work as expected

    I imagined on my localhost it look for:

    but instead it looks for:

    Similarly, I just want to link to my homepage using
    [a href=”/”]homepage[/a]

    but this link points to:

    rather the desired URL of:

    My .htaccess in localhost/wordpress-theme-browser is simply:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress-theme-browser/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress-theme-browser/index.php [L]
    # END WordPress

Viewing 1 replies (of 1 total)
  • esmi


    Forum Moderator

    Relative urls just don’t work well in WordPress. Stick to absolute urls.

Viewing 1 replies (of 1 total)
  • The topic ‘localhost WAMP install: trying to link to blog’s root (end up at localhost root)’ is closed to new replies.