Remove context path on server

Hi,

How to remove the context path from the URL?
For example: https://www.abc.com/site to https://www.abc.com

The showcontext path setting is not working, so I am guessing we need to set it up in Apache httpd settings but I am not sure how?

FYI, I am using Hippo 13.1.0. In earlier versions we could package the delivery application as ROOT.war which would take care of this automatically but not anymore.

Please help.

Thanks,
RK

Yes, Apache it is… see https://documentation.bloomreach.com/library/deployment/configuring/configure-apache-httpd-as-reverse-proxy-for-hippo.html

Also have hst:showcontextpath=false

Cheers, Jeroen

No, it is not working.

I am actually using a load balancer to point to the IP. It removed the port automatically probably because I gave the port as 8080. I made those changes based on the documentation but it didnt work.

The page is returning 404 error and when I append the url with /site it is still showing the website but without any css.

Am I missing something?

I am using below configuration.

<VirtualHost *:80>
ServerName prod.hornbookguide.com
ServerAlias *.hornbookguide.com

LoadFile /usr/lib64/libxml2.so
LoadModule proxy_html_module modules/mod_proxy_html-2.5.2.so
ProxyRequests off
RequestHeader unset Accept-Encoding

RewriteEngine on
RewriteRule ^(/.*) http://prod.hornbookguide.com/site/$1 [P]
SetOutputFilter proxy-html
ProxyHTMLExtended on
ProxyHTMLDoctype XHTML
ProxyPreserveHost On
ProxyPass / http://prod.hornbookguide.com/site/
ProxyPassReverse / http://prod.hornbookguide.com/site/
ProxyPassReverseCookiePath /site /
ProxyHTMLURLMap /site /
</VirtualHost>

<VirtualHost *:443>
ServerName prod.hornbookguide.com
ServerAlias *.hornbookguide.com
ProxyPreserveHost On
ProxyPass / http://prod.hornbookguide.com/site/
ProxyPassReverse / http://prod.hornbookguide.com/site/
ProxyPassReverseCookiePath /site /
</VirtualHost>

Just an update. Nothing worked out so I handled the redirection in AWS load balancer.