This project is read-only.

Link problems...

Jan 28, 2010 at 5:55 PM
Edited Jan 28, 2010 at 8:06 PM

We have an installation of BlogEngine.Net running and are experiencing some issues with the creation of links within a post. As an example, if the Blog is located at and a post is located at When we try to create a link to from within the post, it does not work correctly. It ends up overwriting with ../../../. The resulting link then takes the visitor to which is an invalid page. On the otherhand, if we create a link to, it works just fine as the Blog recognizes it as an external link (www subdomain policy enforced).

Can someone please explain how we can correct this issue?


Zach Hamilton

Feb 1, 2010 at 6:04 AM

Is anyone able to offer any assistance on this matter?

Feb 8, 2010 at 10:37 PM

It has been nearly two weeks since this was originally posted and I have not gotten a reply. Can someone please assist me with this issue?

Feb 8, 2010 at 11:44 PM
Edited Feb 8, 2010 at 11:45 PM

What version of BE are you using?  Are you entering the post on the Add Entry tab in the control panel, or using WLW?

If you add an external link pointing to:

And you save the post and view it on the blog, if you were to do a View Source, the link looks something like the following?
<a href="../../../">link text</a>

Do you have any Extensions installed that don't come with BE?  Extensions can modify the content of a post as its being saved and/or as it's being served to the browser.

With BE 1.5 and BE 1.6, on my local computer where the URL to the blog is http://localhost/be/, I can add any of the following links in a blog post on the Add Entry tab:


And the links stay preserved.  When I check the HTML when viewing the blog post, the HREF is exactly as I specified it.

Feb 9, 2010 at 9:00 AM

I have same problem. I am using be 1.6.

My exactly link is "<a href="~/HtmlPage/mouseclickchart.html" target="_blank">some text</a>". Bud when I have finished and published the post it returns this link: "/post/2010/02/08/~/HtmlPage/mouseclickchart.html" and goes nonexistent page.

Has anyone solution for this problem?

Feb 9, 2010 at 9:11 AM

The tilde ~ sign in a standard <a> tag like that won't do anything -- as you've found.  The tilde is for server side hyperlinks that have a runat="server" tag ... but including runat="server" in a hyperlink when composing a blog post won't do anything.  It's intended for design-time when you are editing physical ASPX pages.

If you want a link that goes back to the root of your site, then you can just use:

<a href="/HtmlPage/mouseclickchart.html" target="_blank">some text</a>

In other words, just remove the tilde.  Or if your blog is installed in a sub-folder, like /blog, then the link would be:

<a href="/blog/HtmlPage/mouseclickchart.html" target="_blank">some text</a>

Feb 9, 2010 at 9:32 AM

Thank you for your quick reply Ben. You right, I did a stupid thing using ~(tilde) for a tag. When I moved tilde it works.

I am appreciate you all for these good blog.


Thank you.


Feb 9, 2010 at 4:36 PM
Edited Feb 9, 2010 at 4:38 PM


Thanks for the response to my request for assistance. We are running BlogEngine.Net and using the Add Entry page for adding Blog Entries.

The only extension that we have added is commentor. However, I have removed this extension and still experience the same problem.

When adding a link to or /, the resulting href (view source) is <a href="../../../">Test</a>, which translates to

When adding a link to or /blog, the resulting href (view source) is <a href="../../">Test</a>, which translates to

And the problem is...

The only other modification I have made to the Blog is the plugins / toolbar buttons for TinyMCE. After reverting to the original TinyMCE code in /admin/tinymce.ascx, the links are saved properly. Therefore, I will need to revert to the original code and begin adding items 1 by 1 to determine which plugin or toolbar button causes the issue to occur. Unless, of course, you know of some of the plugins or buttons that may cause this problem?

Thanks for your help,



Feb 9, 2010 at 5:31 PM


Thanks again for your assistance. I figured out what the problem was. When I modified the TinyMCE editor, I left out the "convert_urls: false," line. Since my last message, I have added it back to the editor and everything works fine now.