I am migrating a word press site from one Ubuntu server to another Ubuntu server.I have changed all the word press URL’s in the database.

When I hit the new URL, I get this error:

This webpage has a redirect loop. Error code: ERR_TOO_MANY_REDIRECTS

What is the issue with that.

If I dont change the old URL in the apache’s Site-enabled 000-default page. Then it works fine and point to the new URL. But i also need to change the apache2.

This is my original sites-enabled file:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName abc.efg.com
    ServerAlias mno.efg.com
    #ServerAlias pqr.efg.com
    #ServerAlias deg.efg.com
    #ServerAlias heg.efg.com
    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
    #   AllowOverride None
        Order allow,deny
        allow from all
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    ErrorLog /var/log/apache2/error.log
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128
    # Section Redirect
    RewriteEngine on
    RewriteCond %{HTTP_HOST} mno.efg.com [NC]
    RewriteRule ^/(.*)?$ http://abc.efg.com/customer-success-services/$1 [R,L]
    RewriteCond %{HTTP_HOST} pqr.efg.com [NC]
    RewriteRule ^/(.*)?$ http://abc.efg.com/corporate-quality/$1 [R,L]
    RewriteCond %{HTTP_HOST} deg.efg.com [NC]
    RewriteRule ^/(.*)?$ http://abc.efg.com/service-product-management/$1 [R,L]
    RewriteCond %{HTTP_HOST} heg.efg.com [NC]
    RewriteRule ^/(.*)?$ http://abc.efg.com/services-engineering/$1 [R,L]

When I replace the server name and alias with Ip 10.250.598.687 it gives me redirect loop error.

Please help me resolve this issue.

Read more here: This webpage has a redirect loop. Error code: ERR_TOO_MANY_REDIRECTS


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , ,

Wordpress related questions and answers: