combining .htaccess
Posted by: Diggory
Posted on: 2008-11-25 08:10:00
Hello,
I've got a site on DH and am having an issue with .htaccess files.
I've developed this site using a PHP framework called CodeIgniter which uses mod_rewrite as so:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|public|user_guide|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>
Which works fine.
However I also want to use a PHP wrapper to use my own custom php.ini like so:
<IfModule mod_actions.c>
Action php-cgi /cgi-bin/php-wrapper.cgi
Action php5-cgi /cgi-bin/php-wrapper.cgi
</IfModule>
If I try either of these as the .htaccess they work - however I would like both of them, so I combined them into one .htaccess file like so:
<IfModule mod_actions.c>
Action php-cgi /cgi-bin/php-wrapper.cgi
Action php5-cgi /cgi-bin/php-wrapper.cgi
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|public|user_guide|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>
But I always get a 500 error from the server when the .htaccess file is like that.
Does anyone know what I'm doing wrong? Why do they work individually, but not combined?