using php5, apache2.2

I am attempting to mix my css and javascript files into one file according to this tutorial: http://rakaz.nl/2006/12/make-your-pages-load-faster-by-combining-and-compressing-javascript-and-css-files.html

I do not think the .htaccess rewrite is working right. Here's my .htaccess file:

<IfModule mod_rewrite.c>
    RewriteRule ^css/(.*\.css) combine.php?type=css&files=$1
    RewriteRule ^javascript/(.*\.js) combine.php?type=javascript&files=$1
</IfModule>

I have attempted precisely what was make the tutorial for that .htaccess, but got a "forbidden" error, therefore the above may be the only factor I started work and a minimum of not throw a mistake.

The web page loads all of the content, but simply does not load the .css, or javascript. I put some debugging within the "mix.php" page to ascertain if that page even will get known as and that i get nothing. So I am convinced that the rewriterule is wrong...but I'm not sure how you can repair it.

Here's the way i include it in to the html:

<link rel="stylesheet" type="text/css" href="http://dev.redsandz.com/css/layout_2col.css,general.css" />

You will find a lot more than 100 posts of individuals saying it labored...i am just undertake and don't.

Can anybody help? Thanks.

@Ronedog: Try without IfModule --

RewriteEngine On
RewriteBase /
RewriteRule ^css/(.*\.css) /combine.php?type=css&files=$1
RewriteRule ^javascript/(.*\.js) /combine.php?type=javascript&files=$1

The Tag <IfModule mod_rewrite.c> only works within the apache-configuration.

Inside your .htaccess file you need to begin with

RewriteEngine On
RewriteBase /

then your conditions.

The opening block:

RewriteEngine On
RewriteBase /
RewriteRule ^css/(.*\.css) combine.php?type=css&files=$1
RewriteRule ^javascript/(.*\.js) combine.php?type=javascript&files=$1

I discovered the reply to the issue only at that link: http://www.issociate.de/board/post/294029/RewriteEngine_causes_403_Forbidden_error.html

The freeBSD directory within the httpd.conf required to have: "Options +FollowSymLinks"...after i added this the forbidden error disappeared and all sorts of labored enjoy it was suppossed to.

Because of everybody who assisted me trobleshoot and fix.