TagLinks not creating correct link

Nov 29, 2010 at 6:50 PM

The tag links on my posts are not linking correctly.

For example the <%=TagLinks(" | ") %> code is currently generating links as follows:

http://mysite.com/?tag=/TagName

Based on some experimentation, I think the links should be:

http://mysite.com/blog.aspx?tag=/TagName

My blog is in the root of the application path. However, I have done extensive work on a custom theme.

Coordinator
Nov 29, 2010 at 7:08 PM

Can you access the blog's homepage via http://mysite.com/ or is it only accessible via http://mysite.com/blog.aspx ?

There is no blog.aspx page in BE, btw.  We have default.aspx which is the homepage that appears when going to http://mysite.com/.

Nov 29, 2010 at 7:13 PM

Thanks for the response.

Unfortunately, the client has requested a flash movie which is displayed as the "homepage" at http://mysite.com

From that page (it's default.htm, for what it's worth), there is an "Enter Site" link. This link goes to http://mysite.com/default.aspx--and all is well.

Until--the user clicks on one of the tags.

I understand that blog.aspx does not exist, but the platform does support that as a means of displaying the blog posts. (Useful when a BE page is selected as "Is Front Page")

Any suggestions as far as getting those tag links to display correctly? 

Coordinator
Nov 30, 2010 at 1:05 AM

A couple of things you could do.  One is to modify the BE core so it produces a different URL for TagLinks.  Recompiling the BE core would be needed.

Another approach is to rename your existing Flash intro page so it has an .ASPX extension.  You can then add server code in there to redirect to default.aspx if there is a "tag" query string parameter.  When renaming default.htm, you would maybe rename it to index.aspx or some name that comes before default.aspx in the list of Default Documents.  The contents in this renamed .ASPX page would look like:

<%@ Page Language="C#" %>

<script runat="server">

	protected void Page_Load(object sender, EventArgs e)
	{
		if (!string.IsNullOrEmpty(Request.QueryString["tag"]))
		{
			Response.Redirect(string.Format("default.aspx?tag={0}",
				Request.QueryString["tag"]));
		}
	}

</script>

.... your existing HTML/Flash content ....
<html>
	....
</html>

Nov 30, 2010 at 1:35 AM

BenAmada,

Again, I thank you for a timely and thoughtful response.

I considered doing your second approach before I posted to this forum.

Unfortunately, GoDaddy uses default.aspx as the highest priority server document. (see: http://help.godaddy.com/article/60#default_win)

So, when someone initially lands on the website (the root URL), I need to display the flash content. (I'm currently doing that in default.htm now)

I don't know whether it is possible to change the order of default document priority. I will look into it.