Developer forum

Forum » CMS - Standard features » Direct Paths in dynamicweb 8.7.2.8

Direct Paths in dynamicweb 8.7.2.8

Mads Sjørslev
Reply

Hi,

I'm trying to add a direct path from this url: https://www.domainname.com/designerdetails-1/vælg-designer-shin-azumi.aspx to this https://www.domainname.com/designerdetails-1/vælg-designer-shin-azumi.aspx?PID=1307 but it dosent redirect.

designerdetails-1 is a page with two paragraphs where PID=1307 is a product catalog app.

Can anyone tell me why it can't redirect?


Replies

 
Nicolai Pedersen
Reply

Because both urls exists. Direct paths will only take affect if the path you try to redirect from does not exist.

 
Mads Sjørslev
Reply

Do you know if there is a way to get the redirect to work?

 
Nicolai Pedersen
Reply

You can do some js hacksy maybe?

Or find another implementation - I do not undertand/like that that redirect is needed...

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Mads,

 

What if in the page you want to redirect to another use, you use the Shortcut feature on the page to redirect to it's final destination.

 

Would that work for you?

https://doc.dynamicweb.com/documentation-9/content/content/pages#3242

 

Best Regards,

Nuno Aguiar

 
Nicolai Pedersen
Reply

Nope, since it is the same page it will be a circular reference causing endless redirects

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Being the same page it does. If they were different pages that would have worked.

 

JS seems a simple solution. And you can use PushState to simply update the URL without triggering a redirect. It's still hacky because you'd need to store the "preferred URL" something on that page to then evaluate the current url against it.

 

You must be logged in to post in the forum