Errors and Redirect Issues While Using the Control Panel

This article describes navigational/redirect issues while using the Control Panel when accessing the Liferay platform through a domain (web server or not). The symptoms of this behavior are somewhat random, but they will manifest themselves in ways such as: 
  • Forward does not Exist error
  • Redirect URL $URL is not allowed error
  • Unresponsive buttons in Control Panel
  • Being redirected to a /null URL in Control Panel

Resolution

These oddities are due to a security property in the Liferay platform that is set to only allow the localhost IP Address by default. If you plan on accessing the Liferay platform remotely, via a domain name, then you will need to define these two properties in your portal-ext.properties:

 ##
## Redirect
##

#
# Set this property to "ip" or "domain" for the redirect security method. If
# set to "domain", the portal will only redirect users to domains listed in
# the property "redirect.url.domain.allowed". If set to "ip", the portal
# will only redirect to domains whose IP address resolve to an IP address
# listed in the property "redirect.url.ip.allowed".
#
#redirect.url.security.mode=domain
redirect.url.security.mode=ip

#
# Input a list of comma delimited domains which the portal is allowed to
# redirect to. Input a blank list to allow any domain.
#
redirect.url.domains.allowed=

#
# Input a list of comma delimited IPs which the portal is allowed to
# redirect to. Input a blank list to allow any IP. SERVER_IP will be
# replaced with the IP of the host server.
#
redirect.url.ips.allowed=127.0.0.1,SERVER_IP

Here is an example:

redirect.url.security.mode=domain 

redirect.url.domains.allowed=company.com,documents.company.com,othercompanydomain.com

In the above example company.comdocuments.company.com, and othercompanydomain.com are the domain names used to access the remote server. The same rule applies if you plan on using IP Addresses. Make sure to keep the 127.0.0.1. 

Was this article helpful?
1 out of 1 found this helpful