Page 1 of 1

preventing infinite loops in mod_rewrite

Posted: Mon Feb 26, 2007 11:25 am
by Luke
Alright, my shared host has suddenly decided that they will no longer allow the use of mod_rewrite in .htaccess files. The reason is that they say that it is too easy to unintentionally create infinite loops that will bring down their server. Isn't there any kind of safe-guard (something like max-execution-time) that will prevent a mod_rewrite rule from looping indefinitely or at least to stop execution after so many seconds??

this host is seriously starting to <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> me off. They change their minds about their policies from day to day, and some-times from support rep to support rep. It's frustrating to say the least.

Posted: Mon Feb 26, 2007 1:29 pm
by feyd
For the 1.3 set there's a note in the docs about being extremely careful with the "n" (next) flag as it can cause an infinite loop. Outside of that, Apache itself can hit a problematic recursion if the rewrite does a redirection.

Me thinks it may be a good time to look for a new host.

Posted: Mon Feb 26, 2007 1:55 pm
by Luke
yea I have been looking for a new host. The problem is that at my work, we use this ecommerce software called Miva Merchant :x that isn't supported by a lot of hosts. We need somebody who can support both PHP4, PHP5, Miva, and eventually Python (possibly, but it's not absolutely necessary). I was looking at Imhosted because they seem to be reasonable price-wise and I've heard good things not only from us being hosted by them, but by others who have hosted with them as well.

Anyway, thanks for the response. I don't even use the "N" flag, or at least I never have. It's irritating that their policies change from call to call though. We've got mod_rewrite via htaccess on every other account with them, but they won't allow it on this one because I just happened to get the wrong support rep on the phone this time. :roll:

Posted: Mon Feb 26, 2007 2:06 pm
by feyd
Sounds like you need a VDS host or something similar where you can run whatever you like.

Since you have multiple accounts with them, you may be able to use the money they are making off you guys to get them to fix it instead of being idiots.

Posted: Mon Feb 26, 2007 3:01 pm
by Luke
We have been considering a VDS, but if we did go that route, we definitely wouldn't use the host we're using now. If you know of any good VDS hosts, let me know.

I have a feeling my boss is going to let them know that this isn't going to fly. You're absolutely right, if they want our business (and we give them quite a bit), they need to stop being idiots.

Posted: Mon Feb 26, 2007 3:15 pm
by feyd
If memory serves, d11wtq did a bunch of searching/whatnot a while ago regarding VDS and the variants similar. Take a look through the Web Hosts board.