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

4
  • 1
    Possible duplicate of Problem with DXA 1.4 Assets path with version no is not accessible Commented May 26, 2016 at 12:13
  • These questions are similar, but distinct. I'm voting to leave open. Commented May 26, 2016 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, Commented May 27, 2016 at 7:07
  • I have the same problem with DXA 1.6. Do you have solved this?
    – Heimei
    Commented Dec 6, 2016 at 8:17

1 Answer 1

-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

3

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.