Developer forum

Forum » Development » RE: SearchEngineFriendlyURLs.GetFriendlyUrl and items

RE: SearchEngineFriendlyURLs.GetFriendlyUrl and items

Jan Sangill
Reply

Hi,

When using items, and the type link, you get the link as this "default.aspx?id=X"

Since I dont want to show links like this. Not good for SEO etc, I am using:

SearchEngineFriendlyURLs.GetFriendlyUrl

Any setbacks performance wise on using this on all links in items?

 


Replies

 
Nicolai Høeg Pedersen
Reply

No.

And there is no reason to call that method - Dynamicweb will by it self convert any <a href="Default.aspx?ID=123"> with the SEO friendly version. If you set the checkbox on URL settings (Internal Links: "Use customized URLs". http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Management-Center/Web-and-HTTP/Customized-URLs.aspx

BR Nicolai

 
Jan Sangill
Reply

Hi Nicolai,

This is checked, but I dont want my source code in links to be "default.aspx?id=X".  I want to render the correct path right away, and not go through a 301 redirect on all links.

But if its safe to use this method on my links, then ill just continue doing this.

Atleast untill the friendly href is exposed on items and their links.

 
Nicolai Høeg Pedersen
Reply

Hi Jan

Dynamicweb handles the output for you - so the output will not contain Default.aspx links. 301's are not used. Not unless someone links to you using that format, then DW will 301 to the right address.

BR Nicolai

 
Jan Sangill
Reply

Hmmm,

This is not the case with me. It displays the default.apsx, and the settings you refer to was added. Weird.

Anything else I might have to do?

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Could be your <a href=""> 'format' - make sure you do not use ' instead of " on attribute values.

Using <a href="Default.aspx?ID=123">Some link</a> would usually work. There could be some casing things involved as well.

BR Nicolai

Votes for this answer: 1
 
Jan Sangill
Reply

Hi Nicolai,

 

It was exactly that. I was using single qoutes around it.

TY.

 

You must be logged in to post in the forum