![]() |
.htaccess & dreamhost - error combining two parts [solved] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: .htaccess & dreamhost - error combining two parts [solved] (/showthread.php?tid=13514) |
.htaccess & dreamhost - error combining two parts [solved] - El Forum - 11-25-2008 [eluser]Diggory Laycock[/eluser] Hi, Sorry, yet another .htaccess issue - I was hoping someone could help me figure out what I'm doing wrong. Here's the scenario: I've got a standard htaccess format that I use for my codeigniter sites that normally works very well: e.g. Code: <IfModule mod_rewrite.c> I've been using this on a site I've had in development for a client. The site is hosted at DreamHost, and while in development the site was hidden in a subdirectory of the web root: i.e. http://www.myclient.com/staging/ and it was all working well. The site allows the client to upload his own videos. DreamHost's default php.ini has a relatively small max_upload - so in order to allow the client to upload larger videos I had to place an .htaccess file in the web root of the site which runs php files with a custom php wrapper as per this page: http://wiki.dreamhost.com/index.php/PHP.ini Code: Action php-cgi /cgi-bin/php-wrapper.cgi That all worked well - and the upload limit was enlarged as per my custom php.ini However - once the site was to go live - the codeingiter directory became the same as the web root - so I need to combine these two .htaccess files. I assumed I could just combine them as so: Code: Action php-cgi /cgi-bin/php-wrapper.cgi Alas - this doesn't appear to work - if I use either of them on their own they work - but if I combine the directives into one file I get the following: Quote:Internal Server Error I'm a bit mystified by why this should happen. Has anyone got any ideas? Thanks. .htaccess & dreamhost - error combining two parts [solved] - El Forum - 11-25-2008 [eluser]thecancerus[/eluser] I think you need to change the RewriteBase to / .htaccess & dreamhost - error combining two parts [solved] - El Forum - 11-25-2008 [eluser]Diggory Laycock[/eluser] I had already changed the Rewrite base. I just copy & pasted the htaccess from earlier in the post when posting to the forum, that's why it appears wrong. Thanks for trying to help though. [edited earlier post] Any more ideas anyone? .htaccess & dreamhost - error combining two parts [solved] - El Forum - 11-25-2008 [eluser]GSV Sleeper Service[/eluser] check your apache error logs, they can sometimes reveals a bit more info about the error. .htaccess & dreamhost - error combining two parts [solved] - El Forum - 11-25-2008 [eluser]Diggory Laycock[/eluser] Thanks to anyone who took a look at this. It seems the combination of the two directives was causing an infinite loop: Quote: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. I've got it working now with the following htaccess: Code: <IfModule mod_actions.c> .htaccess & dreamhost - error combining two parts [solved] - El Forum - 01-28-2009 [eluser]pdswan[/eluser] Thanks for the fix! Just out of curiosity how did you come about this solution? I was able to figure what was happening but had no clue how to fix it. .htaccess & dreamhost - error combining two parts [solved] - El Forum - 01-29-2009 [eluser]Diggory Laycock[/eluser] I had forgotten that DreamHost logs are in your home directory: once I'd looked in (~/logs/domain.com/http/error.log) i noticed that the error Quote:"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."was appearing. I googled something from that and found the answer (I can't remember the exact phrase - probably something like "htaccess LimitInternalRecursion" ) .htaccess & dreamhost - error combining two parts [solved] - El Forum - 10-22-2010 [eluser]Mark Krieger[/eluser] I figured it out: I missed the extra lines in your .htaccess, I put them in, it all works fine now! Mark I have exactly the same problem, I have a new php which I've built (I need SOAP) and I have some rewriting rules for CI. I am using dreamhost for now, they have a php installed with no SOAP support.... Here is the .htaccess: <IfModule mod_actions.c> Options +ExecCGI AddHandler php-cgi .php Action php-cgi /cgi-bin/php.cgi </IfModule> <FilesMatch "^php5?\.(ini|cgi)$"> Order Deny,Allow Deny from All Allow from env=REDIRECT_STATUS </FilesMatch> <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteCond $1 !^(index\.php|images|captcha|user_guide|assets|robots\.txt) RewriteRule ^(.*)$ /index.php?/$1 [L] </IfModule> this fails with an error 500. If I change the first line to: <IfModule !mod_rewrite.c> it 'works', but then the actionhandler to use a custom php fails to use it, it uses the php bin in /usr/local/bin. And if I just have the first group of stuff, with no rewrite rules, I do get the new php! Weird!!!! Help!!!??? Mark |