WordPress.org

Ready to get started?Download WordPress

Forums

Too many redirects in .htaccess cause problems (1 post)

  1. robi123
    Member
    Posted 9 months ago #

    I have 1000 old .html (Google well indexed) pages in 30 folders to redirect, all to root of the same old domain (now WordPress site).
    If i put more then cca. 50 "301 redirects" on my .htaccess file then WordPress stop working properly.
    (for example, the "Read more" function in Posts doesn't work, 500 internal server errors etc. If i remove some redirects then all working fine again). No error messages received.

    What could be the problem? My hosting? (I have quality hosting) Permissions? Maybe an redirect plugin should be a good idea?
    Thanks for any suggestion.

    This is my .htacess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    redirects: "single pages" to root:

    Redirect 301 /old-file-1.html http://mydomain.com/
    Redirect 301 /old-file-2.html http://mydomain.com/
    Redirect 301 /old-file-3.html http://mydomain.com/
    ... etc

    redirects: "entire folder with subfolders in it with all files" all to root:

    redirectMatch 301 ^/old-folder-1/ http://mydomain.com/
    redirectMatch 301 ^/old-folder-2/ http://mydomain.com/
    redirectMatch 301 ^/old-folder-3/ http://mydomain.com/
    ... etc

Reply

You must log in to post.

About this Topic