Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Rewrite rules under lighttpd?


Jason
Member

@greenhome

I got very close, playing around with converting it on my own. I took the .htaccess file that was generated on the old server and used it to create this (placed in my lighttpd config file):

url.rewrite-once = (

"^/forum/([^/]+)/page/([0-9]+)/?$" => "/forum.php?id=$1&page=$2",

"^/forum/([^/]+)/?$" => "/forum.php?id=$1",

"^/topic/([^/]+)/page/([0-9]+)/?$" => "/topic.php?id=$1&page=$2",

"^/topic/([^/]+)/?$" => "/topic.php?id=$1",

"^/tags/([^/]+)/page/([0-9]+)/?$" => "/tags.php?tag=$1&page=$2",

"^/tags/([^/]+)/?$" => "/tags.php?tag=$1",

"^/tags/?$" => "/tags.php",

"^/profile/([^/]+)/page/([0-9]+)/?$" => "/profile.php?id=$1&page=$2",

"^/profile/([^/]+)/([^/]+)/?$" => "/profile.php?id=$1&tab=$2",

"^/profile/([^/]+)/([^/]+)/page/([0-9]+)/?$" => "/profile.php?id=$1&tab=$2&page=$3",

"^/profile/([^/]+)/([^/]+)/favorites/?$" => "/profile.php?id=$1&tab=favorites",

"^/profile/([^/]+)/?$" => "/profile.php?id=$1",

"^/view/([^/]+)/page/([0-9]+)/?$" => "/view.php?view=$1&page=$2",

"^/view/([^/]+)/?$" => "/view.php?view=$1",

"^/rss/?$" => "/rss.php",

"^/rss/forum/([^/]+)/?$" => "/rss.php?forum=$1",

"^/rss/topic/([^/]+)/?$" => "/rss.php?topic=$1",

"^/rss/tags/([^/]+)/?$" => "/rss.php?tag=$1",

"^/rss/profile/([^/]+)/?$" => "/rss.php?profile=$1"

)

Most of the functionality works, but it still seems to be breaking on some minor things (like adding a topic to your favorites while logged in).

Skip to toolbar