Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Rewrite-Rule for LightHttpd
Hi,
because I think lighthttpd is a great Webserver here is the Rewrite-Rule for lighty:
because I think lighthttpd is a great Webserver here is the Rewrite-Rule for lighty:
The source is the .htaccess from Mark's Friendly Urls 1 Plugin. Just deleted all not necessary lines and edited in VIM with
$HTTP["host"] == "your.domain.tld" {
server.document-root = "/path/to/docroot/"
url.rewrite-once = ( "^/discussions$" => "index.php",
"^/discussions/$" => "index.php",
"^/discussions/([0-9]+)$" => "index.php?page=$1",
"^/discussions/([0-9]+)/$" => "index.php?page=$1",
"^/([0-9]+)$" => "index.php?CategoryID=$1",
"^/([0-9]+)/$" => "index.php?CategoryID=$1",
"^/([0-9]+)/([0-9]+)$" => "index.php?CategoryID=$1&page=$2",
"^/([0-9]+)/([0-9]+)/$" => "index.php?CategoryID=$1&page=$2",
"^/discussion/([0-9]+)/([0-9]+)/(.*)$" => "comments.php?DiscussionID=$1&page=$2",
"^/discussion/([0-9]+)/([0-9]+)/(.*)/$" => "comments.php?DiscussionID=$1&page=$2",
"^/discussion/([0-9]+)/(.*)$" => "comments.php?DiscussionID=$1",
"^/discussion/([0-9]+)/(.*)/$" => "comments.php?DiscussionID=$1",
"^/discussion/([0-9]+)/([0-9]+)$" => "comments.php?DiscussionID=$1&page=$2",
"^/discussion/([0-9]+)/([0-9]+)/$" => "comments.php?DiscussionID=$1&page=$2",
"^/discussion/([0-9]+)$" => "comments.php?DiscussionID=$1",
"^/discussion/([0-9]+)/$" => "comments.php?DiscussionID=$1",
"^/categories/$" => "categories.php",
"^/account/$" => "account.php",
"^/account/([0-9]+)$" => "account.php?u=$1",
"^/account/([0-9]+)/$" => "account.php?u=$1",
"^/search/$" => "search.php",
"^/search/([0-9]+)$" => "search.php?page=$1",
"^/search/([0-9]+)/$" => "search.php?page=$1",
"^/search/saved/([0-9]+)$" => "search.php?SearchID=$1",
"^/search/saved/([0-9]+)/$" => "search.php?SearchID=$1",
"^/search/saved/([0-9]+)/([0-9]+)$" => "search.php?SearchID=$1&page=$2",
"^/search/saved/([0-9]+)/([0-9]+)/$" => "search.php?SearchID=$1&page=$2",
"^/post/$" => "post.php",
"^/post/([0-9]+)$" => "post.php?CommentID=$1",
"^/post/([0-9]+)/$" => "post.php?CommentID=$1",
"^/post/category/([0-9]+)$" => "post.php?CategoryID=$1",
"^/post/category/([0-9]+)/$" => "post.php?CategoryID=$1",
"^/settings/$" => "settings.php",
"^/people/$" => "people.php",
"^/(discussions|categories|search|post|settings|people|[0-9]+)/(extensions|themes|images|ajax)/(.*)" => "$2/$3",
"^/(discussions|categories|search|post|settings|people|[0-9]+)/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php)" => "$2",
"^/discussion/([0-9]+/){1,2}[^/]*/(extensions|themes|images|ajax)/(.*)" => "$2/$3",
"^/discussion/([0-9]+/){1,2}[^/]*/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php)" => "$2",
"^/(discussions|account|search|post|[0-9]+)/.+/(extensions|themes|images|ajax)/(.*)" => "$2/$3",
"^/(discussions|account|search|post|[0-9]+)/.+/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php)" => "$2")
}
':%s/\^\(.*\)/\^\/\1/g'and
':%s/^RewriteRule\ \([^\ ]*\)\ \([^\ ]*\)\ .*/\t\t\t "\1" => "\2",/'..thats it, have fun with lighty!
0
This discussion has been closed.
Comments