Shopper gets a redirection failure
When a shopper tries to write a review and is not logged in, the shopper is prompted to log in. The site does not redirect the shopper back to the write a review section after login.
Problem
WebSphere Commerce fails to redirect the shopper because the host name is being used in the URL. WebSphere Commerce developer allows redirect for localhost by default.Solution
You can use localhost in the URL request or update WebSphere Commerce configuration to allow for redirection for the system host name. Update the wc-server.xml file to include the AllowedHost element.- Edit
workspace_dir\WC\xml\config\wc-server.xmlFor example
<Module contextPath="/webapp/wcs/stores" fileServletEnabled="false" name="Stores" urlMappingPath="/servlet" webAlias="/wcsstore"> <initParameters adapters="XML/HTTP, BrowserAdapter" contextSetName="Store" handleDoubleClick="true"/> <URLRedirectFilter enable="true"> <AllowedHost name="hostname.yourdomain.com"/> </URLRedirectFilter> </Module>
- Republish the WebSphere Commerce application.