preventing infinite loops in mod_rewrite

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

preventing infinite loops in mod_rewrite

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply