Developer forum

Forum » Development » Getting SEO friendly URL from ID

Getting SEO friendly URL from ID

Martin Nielsen
Reply
Hi DW,

I have a problem with DW and SEO urls.

The task:
We're migrating a website from one "Website" to another internaly in DW. We've mapped the pages, and now we need to map products.
I've created a small content module that can find the link to the new product page, and also handle the redirect.
While the link i find works, it's not SEO friendly.

My link looks like this:
/Default.aspx?ID=5460&GID=GROUP51&ProductID=PROD868&PID=20254

What i need it to look like is:
/corp/products/anaesthesia/product.aspx?GID=GROUP51&ProductID=PROD868&PID=20254

When i call the first link it doesn't automaticly send me to the SEO friendly url, so i figure i need to make sure my link is SEO friendly before making my redirect.

So the question is.
What API call should i make to get the SEO friendly url for a given page id

Regards
 Martin



Replies

 
Nicolai Høeg Pedersen
Reply
Is your "Ensure Unique paths" option set?
http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Management-Center/Customized-URLs.aspx

 
Martin Nielsen
Reply
No.
Should it be?
 
Nicolai Høeg Pedersen
Reply
If you do, DW will 301 your "ugly" URL to the "Pretty" - problem solved!
 
Martin Nielsen
Reply
Activating this breaks my URLs.
I don't have a domain pr. website.

What other options do i have?
 
Nicolai Høeg Pedersen
Reply
Hi Martin

Then I think you set the wrong checkbox.

You both have "Ensure unique paths for each area" in the URL section and a "Ensure unique path" in the Indexing section. You set the first one, and you need to use the other...

 
Martin Nielsen
Reply
Hi Nicolai,

I need to read your posts more carefully :-)
Checking the right checkbox did the trick. 

Thanks

Regards
 Martin

 

You must be logged in to post in the forum