Default url site

Hi,
Currently I start demo from Create the Project - Bloomreach Experience Manager (PaaS/Self-Hosted) - The Fast and Flexible Headless CMS
After setup the demo from mvn archetype command I add a new channel.
So I have two channels

  1. Channel1 - named bloomreach → from mvn archetype bloomreach
  2. Channel2 - named: demo → adding manually pages, nodes (try to replicate the pages from the bloomreach channel 1)

When I go to bloomreach
http://localhost:9080/site/ → display the homepage channel 1
when i go to demo
http://localhost:9080/site/demo → display homepage channel 2

question
how do I remove “site” from the url http://localhost:9080/site/demo
so I would like to see for my channel2 http://localhost:9080/demo and not
http://localhost:9080/site/demo
view channel 1 named bloomreach: http://localhost:9080/site


view channel 2 named demo: http://localhost:9080/site/demo

Why would you want to remove the web application’s context on localhost?

I don’t understand your question

Why do you want to do what you asked to do? The context is necessary. If you want to remove it you need to reverse proxy the requests.

I want to remove “site” word in my url
Rigth now in my channel 2 i have
http://localhost:9080/site/demo
And get this url adding in the freemaker in href/demo but i think this is not correct
I want to
http://localhost:9080/demo

Channel 1 has url
http://localhost:9080/site

And before i find the solution on the freemaker (which im sure is wrong) the two channel has the same url

So, my question where and how i need to configure to get on channel 2
http://localhost:9080/demo

And not
http://localhost:9080/site/demo

Every channel has its own url, but i dont know where to configure that

Where and what is the context?

The context path is how tomcat knows which application you are talking to. You can set a property (hst:showcontextpath) on the mount so that links generated won’t show the context path, however tomcat is completely unaware of this. You’d need to run an apache or nginx instance to catch the traffic and redirect it to tomcat on the correct url. For local development it’s probably not worth the effort.

Tomcat does have a mechanism for deploying an application on the root path, but we don’t support that pattern.

see also

Hi Jasper,

if I urdenstand correctly this need to be done?


when i run the homepage I see this now

As I mention previously I have two channels, and I woudl like to know if every channel can have their own endpoint


The screenshoot are from channel 2 demo
Now when i hover in hyperlink: ‘home’ i see http://localhost:9080/site/demo
But when I hover I hyperlink ‘news’ I see http://localhost:9080/demo/news
image

on the cms channel manager when I do click in ‘home’ -channel 2 demo

redirect to channel 1 bloomreach

Morevoer when I click back on the browser
image
redirect from channel 2 → http://localhost:9080/site/demo
to channel 1 → http://localhost:9080/site

It is possible for every channel to have it’s own endpoints. Your mount nodes represent the endpoints. I would leave showcontextpath enabled. While working locally you should just leave the context path as tomcat needs it to find the application.

Hi Jasper,

Thank you for your help I rename some stuff, so now I have the url
localhost:9080/site/demo/homepage
but when I hover in button “home” still redirect to the wrong url

I should redirect to:
localhost:9080/site/demo/homepage

Do i need to add something in the container?


in the channel manager when i click in home

redirect to

The home button you’re referring to is not in the container. Instead, it is configured as a menu item. Depending on the value of the menu item, the redirect will be handled differently.

Hi Nicholas,
Thank you for your answer, I solve the issue.

I have a question now when I click in my channel demo in the channel manager display


how do I link my homepage to my channel

when I click

so what I want to see when I click channel demo is the homepage
Thanks in advance

Hey andorian,

Please create a new thread for a different issue. If you could, please include a video. I’m not certain what you’re asking to do.

sure, thank you!