You are not logged in.

#1 2007-10-03 14:33:19

freigeist
Member
From: Cologne, Germany
Registered: 2006-07-14
Posts: 191

lighttpd and rewrite

Hello,
I have some problems with my lighttpd configuration and wordpress. I use the following rewrite configuration:

url.rewrite = (
"^/gallery/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?$" => " /wp-content/plugins/fgallery/fim_photos.php?$1=$2&$3=$4",
"^/(wp-admin/|wp-content/|wp-includes/|wp-login\.php|xmlrpc\.php|robots\.txt|sitemap\.xml|wp-).*" => "$0",
"^" => "index.php" )

Everything is working fine except that I have a directory /downloads under my http base dir and everytime someone wants to access a file in this directory or any subdirectory of this the Url will be rewritten with the index.php and you get a 404 of the wordpress installation.

How do I exclude URLs that start with downloads/?

I tried something like:

"^/downloads/$" => "^/downloads/$"

to create a matching line before the last rewrite with index.php. But now I always get a lighttpd 404, even if the file exists.


Elfenbeinturm.cc
a metaphysical space of solitude and sanctity: http://www.elfenbeinturm.cc

Offline

#2 2007-10-03 14:47:39

Matt3o
Member
From: Firenze, Italy
Registered: 2007-09-13
Posts: 177

Re: lighttpd and rewrite

just guessing... but adding |downloads/ to the 2nd regex doesn't help?

Offline

#3 2007-10-03 16:05:27

freigeist
Member
From: Cologne, Germany
Registered: 2006-07-14
Posts: 191

Re: lighttpd and rewrite

unfortunately not...i get the 404 of wordpress...

Maybe I just don't understand the rewrite syntax very well, is there a good documentation for a dummy like me?


Elfenbeinturm.cc
a metaphysical space of solitude and sanctity: http://www.elfenbeinturm.cc

Offline

Board footer

Powered by FluxBB