• problem: developping a new WP site on localhost XAMPP, want to go live in some weeks. Installed WP, plugins, content…, works like a charm… Meantime, I have about 300 redirects I want to do from url’s on the old site to url’s on the new site. Using .htaccess > redirect 301. Now whem I am on 80 redirects I get this error 310 on my website. Everything blocks. Then when I cut some lines on the htaccess getting back to 80, it works again. What ‘s causing this problem? Is XAMPP server limited? Can I change this? Do I have to wait for the remote server to set a definitive .htaccess? I have been looking on the internet and server could effectively cause this problem, but no details on how to solve this. Anyone? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    Error 310 is for too many redirects. You must have conflicting rules sending a request into circles. Are you sure you need 300 redirect directives? There’s no way to greatly reduce that using regular expressions? If you cannot even do so with regular expressions, consider using RedirectMap. Very large .htaccess files cause performance issues.

    In any case, the size limit for .htaccess directives is very high. You’ll have performance issues long before you hit the limit.

    It’s not clear what you are changing by redirecting. If it’s all relative redirects, they can be tested on localhost, but if domains are involved, the only way to manage that locally is by adding domains to your hosts file and sending them to 127.0.0.1. Doing so does mean you can no longer access the related production sites until the hosts entries are removed.

    Thread Starter Freddy Helsen

    (@fhelsen)

    Thank you very much bcworkz. I even didn’t knew there was a plugin for that. “conflicting rules sending a request into circles”, have to examine that, good question.
    I am actually working on the fifth version of my site (wordpress), knowing that there are a considerable amount of backlinks and bookmarks to the pages of the third and actual fourth live version of the site (actually Joomla). So I have to redirect all of these pages/links from both versions to the new url’s. I’ve always been working with Joomla, but had reasons to switch to WordPress. Felt good and natural from the beginning.. think I won’t go back.
    I will see tomorrow for both eventually conflicting rules and plugins. Thanks again!

    Before performing a redirect you must understand the origin of the data and then you can create one more rules for the redirect.
    If you blindly modify even the plugin it can not help since mod_rewrite uses a regex but the regex created by an inexperienced user may not be the expected result.
    please can you share all url structures and how to transform them?

    Thread Starter Freddy Helsen

    (@fhelsen)

    Some feedback on this topic.

    What I did: because of several tests and install/remove a lot of plugins (my first WP website…), I decided it would be much better to restart from a clean fresh installation. So the site and database were completely deleted and I started all over again.
    Guess what… no more problems with the amount of redirects on the htaccess file. Actually, there are about 500 redirects. Yes, on the same xampp server. So it was surely not the server who caused the problem. What it was? I don’t know. Some bad coding in htaccess I presume. But I wanted to thank the people who helped me here and set me thinking.. Meanwhile, the site is up and running on a remote server.

    ok for closing this topic.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘localhost xampp error 310 .htaccess’ is closed to new replies.