Website is not redirecting properly

Created:

2016-12-18 06:53:48 UTC

Modified:

2017-08-16 17:35:49 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Website is not redirecting properly

Applicable to:

  • Plesk Onyx for Linux

Note: This article has the reference to the issue with the fix available:

  • #PPPM-5290 "Browsing a domain alias resulted in an endless redirect loop if the alias domain name was similar to the name of the parent domain and the “Enable ‘Redirect with the HTTP 301 code” option was disabled in the alies settings."
    Fixed in:
Please consider updating your server:

Symptoms

  • Website is not redirecting properly showing the error:

    ERR_TOO_MANY_REDIRECTS

    or

    The page isn't redirecting properly
  • Primary domain and domain alias have similar names with special characters and domain alias contain the character "." in its name. Example:

    • Primary domain name: domain-example.com

    • Alias name: domain.example.com

Cause

Product bug with ID PPPM-5290 .

Workaround

  1. Download and unpack attached fixes:

  2. Download

        # wget -P /root/tmp https://support.plesk.com/hc/article_attachments/115004516145/seoSafeRedirects.zip

    # wget -P /root/tmp https://support.plesk.com/hc/article_attachments/115004544169/nginxSeoSafeRedirects.zip
  3. Unpack

        # unzip /root/tmp/seoSafeRedirects.zip -d /root/tmp

    # unzip /root/tmp/nginxSeoSafeRedirects.zip -d /root/tmp
  4. Put these files to the directory with virtual hosting custom templates /usr/local/psa/admin/conf/templates/custom/domain/service/ :

    # mv /root/tmp/seoSafeRedirects.php /usr/local/psa/admin/conf/templates/custom/domain/service/

    # mv /root/tmp/nginxSeoSafeRedirects.php /usr/local/psa/admin/conf/templates/custom/domain/service/
  5. If directory does not exist, create it using the command:

        # mkdir -p /usr/local/psa/admin/conf/templates/custom/domain/service/
  6. Reconfigure domains:

    # plesk sbin httpdmng --reconfigure-all

Warning! In case of big number of hosted domains, execution of httpdmng with option --reconfigure-all can cause significant downtime of the websites. Consider to perform this command during maintenance time frame, when the server load is low.

Attachments:

Have more questions? Submit a request
Please sign in to leave a comment.