Try our conversational search powered by Generative AI!

Can we prevent particular urls from being served?

Vote:
 

We have a website where by we need to redirect all the child urls of a site, but not the top level, i.e.

www.domain.com/products/some-product-page redirects to www.domain.com/some-product-page

the latter url being a simple address.

However, we have a page that exists on www.domain.com/products, and this page is being redirected to the site homepage. So trying to do this, with a simple redirect rule in web.config, is proving to be a bit of trouble. 

The other idea I'm toying with, is having Episerver itself handle these redirects. But I'm not sure how.

And yes, the simple addresses have canonical links set up but the customer is adamant about having these duplicate urls removed.

#140510
Oct 21, 2015 15:52
Vote:
 

I'm not 100% sure of your requirements but it sounds like custom routing might be appropriate:

http://joelabrahamsson.com/custom-routing-for-episerver-content/

#140520
Oct 21, 2015 21:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.