2

I have site definition up to C.

enter image description here

When accessing the properties in the URL Property page name is displayed. How to avoid it?

Current Url:Http:/Sitename/en/Propert Page/PropertyName

Expected URL:http:/Sitename/en/PropertyName

I tried Alias name didn't work. I searched and tried IIS redirect it also didn't work.

Anyone handled this scenario with simpler approach kindly guide me.

2
  • You need to implement a rewrite processor. There are some modules on sitecore marketplace which allows you to perform url rewriting Commented May 15, 2018 at 22:04
  • 5
    The simplest solution is to move the pages. If you don't want to do that then re-think your information architecture because it is wrong. Maybe rename Property Page to Properties and make it a listing page instead of creating hacks to resolve it.
    – jammykam
    Commented May 16, 2018 at 0:43

2 Answers 2

1

You can look into the below solution: https://stackoverflow.com/a/20605991/4129621

you have to override LinkProvider and ItemResolver for that as mentioned in above URL.

0

It can be done using the sitecore alias. I'm not sure how you create alias. I have implemented this for one of my projects.

Sitecore Content Tree

  • Home
    • Blog
      • Categories
        • Cricket
        • Football

If you want to access a cricket page, url would be http://sitecore.local/blog/categories/cricket

But client wanted this page to be access like http://sitecore.local/blog/cricket

we have created an alias url as follows. 1. First create a alias item for Blog 2. Under Blog item, create an alias for Cricket and map the url to categories/cricket. 3. Do the similiar step for football. It will resolve your issue.

Another step: You have create your custom link provider & check for that particular page template. If you find, write your logics as per your requirement. https://gist.github.com/Adamsimsy/4c4af66a53d3b7ba2ebef5a46c067ca7

1
  • i have 183 properties do i need to create alias name for all properties
    – sindu
    Commented May 17, 2018 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.