Redirection is not happening

Issue

  • After setting the below property with the following values in portal-ext.properties, redirection to the defined domain has not happened rather its showing warning messages.
    #
    #redirect.url.security.mode=
    #redirect.url.security.mode=159.113.202.96
    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=dxp-test.myplanlink.com

    #
    # 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

Environment

  • Liferay 7.1

Resolution

  • In portal.properties, the redirection property is defined as below
    ##
    ## 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. Specifying a domain
    # with a leading "*." allows redirects to subdomains.
    #
    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
  • According to the stated information on each property, it can only be used in the following two ways. 
    1. IP: If set to 'IP' mode the property should be used as follows​ and redirection will happen based on defined IP address
    redirect.url.security.mode=ip

    redirect.url.domains.allowed=

    redirect.url.ips.allowed=127.0.0.1,159.113.202.96

    SERVER_IP  is replaced by the IP address of your host machine
    2. Domain: If set to 'Domain' mode the property should be used as follows​ and redirection will happen based on defined domain
    redirect.url.security.mode=domain

    redirect.url.domains.allowed=dxp-test.myplanlink.com

    redirect.url.ips.allowed=127.0.0.1,SERVER_IP
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0