4
votes
Accepted
How to set default controller for an area
You need to register the Area. So, create a registration area under the path /Areas/MyTools/. You can name it MyToolRegistrationArea.cs.
In the MyToolRegistrationArea.cs, add the following
...
3
votes
How to add custom route in Angular JSS ? Domain/<Page>/<id>
I achieved this using wildcard-item in sitecore.
I created like below,
Below list of working urls.
http://a-custom-route.com/articledetail/id1
http://a-custom-route.com/articledetail/id2
Note:
...
3
votes
Accepted
Sitecore WebApi custom route not working controller not found
Your route pipeline definition should be changed to this one:
public class RegisterTestApiRoute
{
public virtual void Process(PipelineArgs args)
{
RouteTable.Routes.MapRoute(
...
2
votes
Accepted
Adding sitemap.xml custom route causes EnsureLoggedInForPreview.Process
I had to explicitly allow xml files using the Sitecore FilterUrlExtensions setting:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
...
2
votes
Accepted
Requested document not found when using MVC routes
The code below is code I reuse constantly. The only caveat is that is the controller is in a different project/library than the route initialization code, strange thing happen. I always keep the ...
1
vote
HTTP 500 errors when accessing custom route which can't find a controller
You can:
Create custom Contoller Factory overriding SitecoreControllerFactory class.
Register custom factory in Sitecore ( https://doc.sitecore.com/xp/en/developers/103/sitecore-experience-manager/...
1
vote
Accepted
{virtualFolder} in route config is not taking full path defined on the site defnition file
You need to define separate routes for entries like that:
routes.MapRoute(
name: "routeNameVirtualFolder",
url: "{virtualFolder}/api/ContrrolerName/ActionName",
...
1
vote
Custom route for wild card
You can use IIS Rewrite inbound rules to accomplish this, for example:
<rule name="Property URL Rewrite" stopProcessing="true">
<match url="^new/Brand-([0-9]+)/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
custom-route × 9routing × 4
sitecore-api × 2
jss × 1
mvc × 1
pipelines × 1
webapi × 1
sitemap × 1
wildcards × 1
processor × 1
sitecore-mvc × 1