HTTP Status 500 – Cannot find CMSSite associated with current URL

This is the first error we see, when we set up Hybris and hit http://localhost:9001/

Hybris supports multi sites for a single code base, which can be accessed by passing a request parameter while accessing the site for first time. This parameter is set in browser session for subsequent requests.

http://localhost:9001/?site=hybris

When you pass the parameter site, with value same as your CMS site id, you are able to see the home page.

If you are using a single storefront, then you need to tell hybris specifically, by configuring the URL patterns for your site, so that hybris knows, what site you are looking for, when hit without a parameter. This can be dine in site.impex

$siteUid=hybris
UPDATE CMSSite;uid[unique=true];urlPatterns;defaultlanguage(isocode)
;hybris;”(?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=$siteUid)(|\&.*)$,(?i)^https?://$siteUid\.[^/]+(|/.*|\?.*)$;en

 

One thought on “HTTP Status 500 – Cannot find CMSSite associated with current URL

  1. I just want to say that I like your posting. In fact I am using your site regularly. Your articles are very effective and i am very thankful to you for sharing this site with knowledgeable content .

    Like

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s