Developer forum

Forum » Ecommerce - Standard features » RE: Product URL Redirect

RE: Product URL Redirect

Jeppe Jakobsen
Reply

Hello everyone.

I have a site that uses https and user-defined urls, which is causing a problem with any url that requires a internal redirect on the site.

An example of this:
"/Default.aspx?ID=13&ProductID=00115110000000"
is translated to: "/products/sol.aspx", but it will only work if i use the translated link, otherwise it sends the user to the frontpage.

The obvious solution to this, is only to use the translated links everywhere on the site, but my products does not contain a translated link in the templatetags. So basicly, I'm trying to either get the translated links before rendering front-end, or a way solve the redirect problem entirely. 

I'm aware that dw has a dictionary with translated urls somewhere in the system, i just don't know how to access it in a convenient way.

 

Thanks in advance.  

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Jeppe

DW is able to handle links by itself. You should always have your links in code like /Default.aspx?ID=13&ProductID=00115110000000 - dw will rewrite them to the right one before serving them.

So I would like to see the issue in action if you can provide a link?

BR Nicolai

 
Jeppe Jakobsen
Reply

https://utv.vikingfootwear.com/Default.aspx?ID=3&ProductID=00346450000000

The link is found like this: 

"link": "<!--@Ecom:Product.Link.Clean.JSEncoded()-->",

which becomes

"link": "Default.aspx?ID=3\u0026ProductID=00143300000000"

the real link should be:

"/products/elk-hunter.aspx"

 
Nicolai Høeg Pedersen
Reply

It seems like you have some sort of misconfiguration. If I access https://utv.vikingfootwear.com/Admin/ I get the home page. If I add default.aspx (https://utv.vikingfootwear.com/Admin/default.aspx) I get the login.

Looking at the network, I get a correct 301 from DW to the right URL and then a 302 to the homepage - that is not coming from DW (it would say so in the header). See dump.

BR Nicolai

Capture.PNG
 
Jeppe Jakobsen
Reply

Yes, i am aware of this. I talked to your colleague Lars about this, and he said that it might have something to do with the page using HTTPS.

It redirects to the HTTP page, not HTTPS. I am not aware if there is a setting for this.

Capture.PNG
 
Nicolai Høeg Pedersen
Reply

Setting can be found in the manual: http://manual.dynamicweb-cms.com/Default.aspx?ID=652&q=ssl

But as I said, Dynamicweb will usually add a header saying it did the redirect, and you also get a redirect accessing https://utv.vikingfootwear.com/Admin/ which is with ssl already and DW do not have redirect for that...

So I think you might have some settings somewhere else you need to locate.

BR Nicolai

 

You must be logged in to post in the forum