.htaccess v.1.4.5 generates Apache errors

I recently upgraded my zenphoto site from 1.4.3.1 to 1.4.5.9. Now the links on my site no longer work (I have mod_rewrite enabled).

- When I hover on the link, the correctly rewritten URL is shown in the browser bottom bar; when I click on it I get an

"Internal Server error:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log."

- Also whenever I click on a rewritten link the Apache server logs the following error:

"[Wed Mar 05 14:20:35.038950 2014] [core:error] [pid 341:tid 2684849432320] [client 96.23.217.65:65049] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://mysite.com/"

I am no .htaccess expert, so I looked up what this server error might mean. The explication I found is that:

"That usually means you have an error in your rewrites causing an infinite loop. The limit catches it from becoming infinite as a rule.

When it says:

"Request exceeded the limit of 10 internal redirects due to probable configuration error."

That means in one request it has been rewritten 10 times. That is a lot, and unless you have very complex rewrite rules going on, you most likely have a loop occurring."

(source: http://stackoverflow.com/questions/5058935/how-to-lift-the-limit-on-maximum-number-of-internal-redirects)

So, I replaced the .htaccess version 1.4.5 installed by the zenphoto 1.4.9 upgrade, with the
old .htacess version 1.4.3.1 I had before. This fixed both errors: the re-written links work ok and there are no sever errors.

I tried to compare the two .htaccess version to see if I can figure out things but I do not have enough knowledge of the rewrite riles to see wth the problem might be.

What is sure though is that the errors are caused by replacing the old .htaccess file with the new one.

Any help much appreciated. I will post the .htaccess v.1.4.3.1 separately, if needed

Comments

  • acrylian Administrator, Developer
    You need to use the 1.4.5 version as Zenphoto does not handle all rewriting via htaccess but internally. With 1.4.6 you will be able to define own rules via a plugin (for example change the "news" in Zenpage items to "posts" or whatever). You will find that the 1.4.5 one is much shorter than the 1.4.3 one. Info about that here:
    http://www.zenphoto.org/news/zenphoto-1.4.5#change-in-rewrite-rule-handling

    Make sure you really have the right htaccess file. Sometimes permission don't allow setup to update it automatically. Then you need to copy the template file from /zp-core to the root of your install and rename it.

    I can assure that 1.4.5.x works on plain shared hosts without any special setup.
  • I was using the .htaccess version 1.4.5 (from the Zenphoto 1.4.5.9 upgrade).

    Anyway, I copied over a new 1.4.5 version and it now works ok.
    I think it the rewrite base somehow got messed up during the upgrade.

    Thank you for your help.
Sign In or Register to comment.