1

I am facing issue with page URL in DXA 1.4. I have installed DXA 1.4 along with all required services with SDL web 8.1 on single machine as per the installation instruction.

When I am accessing site and navigate to one of the news page from the news list at bottom of the home page it open the below URL:

http://localhost:8888/articles/news/news1 ------- This URL throws 404 error

But When I put .html extension to the page URL it appears correctly: http://localhost:8888/articles/news/news1.html --- This work perfectly.

Please guide me where I am missing.

Thanks Piyush Jain

  • 1
  • These questions are similar, but distinct. I'm voting to leave open. – Dominic Cronin May 26 '16 at 13:51
  • 1
    Again similar to your other question, we will need more information like debug logs to be able to figure out what is going wrong. What you are experiencing is not normal behavior so something somewhere went wrong. But it will be very difficult to debug this blindly online. I think you might want to choose to followi the entire installation procedure step by step again and see if you missed something. Or even consider ditching everything and starting from scratch again as debugging this is like finding a needle in a haystack, since you missed a step or have a broken environment, – Bart Koopman May 27 '16 at 7:07
  • I have the same problem with DXA 1.6. Do you have solved this? – Heimei Dec 6 '16 at 8:17
-1

DXA does to loopup against the SDL broker database for the page URL

In Tridion you page is most likely called news1.html, or some other extension, as Tridion cannot explicitly do extension-less URLs

You have two a few options

  1. Use a re-write rule to remove the extension
  2. In your code, append the '.html' to any url's that do not arrive with it

asp.net e.g. update route config to from:

// Tridion Page Route
routes.MapRoute(
   "Core_Page",
   "{*pageUrl}",
   new { controller = "Page", action = "Page" },
   new { pageId = @"^(.*)?$" }
).DataTokens.Add("area", "Core");

to:

// Tridion Page Route
routes.MapRoute(
   "Core_Page",
   "{*pageUrl}.html",
   new { controller = "Page", action = "Page" },
   new { pageId = @"^(.*)?$" }
).DataTokens.Add("area", "Core");

Warning, this code will not handle .html requests -- you will get .html.html. You can get more advanced with your routing to handle both scenarios if required

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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