views:

185

answers:

1

Hi All, I have this custom written CMS built on XAMPP. I'm trying to test the same on lighttpd to benchmark the so-called performance gains... but am stuck at the rewrite rules. I use the default rewrite rules of WordPress in my .htaccess which hands all url parsing over to my script as long as there aren't any files or directories same as the URL structure. Here's the code:

RewriteBase /somedir/

# Let the Script handle all pretty URLs
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule .* index.php [L]

Can anyone please help me translate the same to the lighttpd format? I could only (partially) figure out the last line myself going through the lighty docs ... i.e.

url.rewrite-once = ( ".*" => "index.php" )

But that of course won't suffice... All my CMS is doing is giving me 404's.

Thanks, miCRoSCoPiC^eaRthLinG

A: 

You can try setting a php script as 404 URL:

server.error-handler-404 = "/404.php"

Then in this script set the variables (such as $_GET) and then include the target script.

SorinV
Thanks SorinV... although that's not quite the solution I'm seeking, it's a pretty slick workaround. Never thought of it that way before :D If there are no other direct methods to achieve the task, I guess I'll have to resort to your suggestion.
miCRoSCoPiC_eaRthLinG