homepage Welcome to WebmasterWorld Guest from 54.197.94.241
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
How to make this .htaccess work on Lighttpd?
teasers




msg:4632843
 11:20 am on Dec 22, 2013 (gmt 0)

Hello,

I converted .htaccess below to Lighttpd but it doesn't work. What mistake did I make?

Original .htaccess:

RewriteEngine On
Options +FollowSymLinks
RewriteRule ^sitemap/([^/]*)\.html$ /sitemap.php?start=$1 [L]
RewriteRule ^([^/]*)\.jpg$ /image.php?url=$1 [L]
RewriteRule ^([^/]*)\.com$ /index.php?url=$1.com [L]
RewriteRule ^([^/]*)\.net$ /index.php?url=$1.net [L]
RewriteRule ^([^/]*)\.org$ /index.php?url=$1.org [L]
RewriteRule ^([^/]*)\.la$ /index.php?url=$1.la [L]
RewriteRule ^([^/]*)\.za$ /index.php?url=$1.za [L]
RewriteRule ^([^/]*)\.bg$ /index.php?url=$1.bg [L]
RewriteRule ^([^/]*)\.ng$ /index.php?url=$1.ng [L]
RewriteRule ^([^/]*)\.ec$ /index.php?url=$1.ec [L]
RewriteRule ^([^/]*)\.cd$ /index.php?url=$1.cd [L]
RewriteRule ^([^/]*)\.kw$ /index.php?url=$1.kw [L]
RewriteRule ^([^/]*)\.af$ /index.php?url=$1.af [L]
RewriteRule ^([^/]*)\.na$ /index.php?url=$1.na [L]
RewriteRule ^([^/]*)\.gi$ /index.php?url=$1.gi [L]
RewriteRule ^([^/]*)\.mn$ /index.php?url=$1.mn [L]
RewriteRule ^([^/]*)\.ht$ /index.php?url=$1.ht [L]
RewriteRule ^([^/]*)\.mt$ /index.php?url=$1.mt [L]
RewriteRule ^([^/]*)\.ps$ /index.php?url=$1.ps [L]
RewriteRule ^([^/]*)\.pa$ /index.php?url=$1.pa [L]
RewriteRule ^([^/]*)\.ao$ /index.php?url=$1.ao [L]
RewriteRule ^([^/]*)\.ma$ /index.php?url=$1.ma [L]
RewriteRule ^([^/]*)\.hk$ /index.php?url=$1.hk [L]
RewriteRule ^([^/]*)\.to$ /index.php?url=$1.to [L]
RewriteRule ^([^/]*)\.do$ /index.php?url=$1.do [L]
RewriteRule ^([^/]*)\.cz$ /index.php?url=$1.cz [L]
RewriteRule ^([^/]*)\.al$ /index.php?url=$1.al [L]
RewriteRule ^([^/]*)\.lt$ /index.php?url=$1.lt [L]
RewriteRule ^([^/]*)\.sk$ /index.php?url=$1.sk [L]
RewriteRule ^([^/]*)\.pt$ /index.php?url=$1.pt [L]
RewriteRule ^([^/]*)\.mx$ /index.php?url=$1.mx [L]
RewriteRule ^([^/]*)\.tr$ /index.php?url=$1.tr [L]
RewriteRule ^([^/]*)\.il$ /index.php?url=$1.il [L]
RewriteRule ^([^/]*)\.int$ /index.php?url=$1.int [L]
RewriteRule ^([^/]*)\.by$ /index.php?url=$1.by [L]
RewriteRule ^([^/]*)\.ir$ /index.php?url=$1.ir [L]
RewriteRule ^([^/]*)\.id$ /index.php?url=$1.id [L]
RewriteRule ^([^/]*)\.ar$ /index.php?url=$1.ar [L]
RewriteRule ^([^/]*)\.jp$ /index.php?url=$1.jp [L]
RewriteRule ^([^/]*)\.zm$ /index.php?url=$1.zm [L]
RewriteRule ^([^/]*)\.info$ /index.php?url=$1.info [L]
RewriteRule ^([^/]*)\.ro$ /index.php?url=$1.ro [L]
RewriteRule ^([^/]*)\.no$ /index.php?url=$1.no [L]
RewriteRule ^([^/]*)\.uk$ /index.php?url=$1.uk [L]
RewriteRule ^([^/]*)\.pl$ /index.php?url=$1.pl [L]
RewriteRule ^([^/]*)\.ru$ /index.php?url=$1.ru [L]
RewriteRule ^([^/]*)\.edu$ /index.php?url=$1.edu [L]
RewriteRule ^([^/]*)\.ws$ /index.php?url=$1.ws [L]
RewriteRule ^([^/]*)\.ua$ /index.php?url=$1.ua [L]
RewriteRule ^([^/]*)\.vn$ /index.php?url=$1.vn [L]
RewriteRule ^([^/]*)\.br$ /index.php?url=$1.br [L]
RewriteRule ^([^/]*)\.cl$ /index.php?url=$1.cl [L]
RewriteRule ^([^/]*)\.au$ /index.php?url=$1.au [L]
RewriteRule ^([^/]*)\.eu$ /index.php?url=$1.eu [L]
RewriteRule ^([^/]*)\.hu$ /index.php?url=$1.hu [L]
RewriteRule ^([^/]*)\.in$ /index.php?url=$1.in [L]
RewriteRule ^([^/]*)\.be$ /index.php?url=$1.be [L]
RewriteRule ^([^/]*)\.gr$ /index.php?url=$1.gr [L]
RewriteRule ^([^/]*)\.am$ /index.php?url=$1.am [L]
RewriteRule ^([^/]*)\.at$ /index.php?url=$1.at [L]
RewriteRule ^([^/]*)\.it$ /index.php?url=$1.it [L]
RewriteRule ^([^/]*)\.cc$ /index.php?url=$1.cc [L]
RewriteRule ^([^/]*)\.cn$ /index.php?url=$1.cn [L]
RewriteRule ^([^/]*)\.pk$ /index.php?url=$1.pk [L]
RewriteRule ^([^/]*)\.ly$ /index.php?url=$1.ly [L]
RewriteRule ^([^/]*)\.us$ /index.php?url=$1.us [L]
RewriteRule ^([^/]*)\.tk$ /index.php?url=$1.tk [L]
RewriteRule ^([^/]*)\.tv$ /index.php?url=$1.tv [L]
RewriteRule ^([^/]*)\.tel$ /index.php?url=$1.tel [L]
RewriteRule ^([^/]*)\.mobi$ /index.php?url=$1.mobi [L]
RewriteRule ^([^/]*)\.name$ /index.php?url=$1.name [L]
RewriteRule ^([^/]*)\.gov$ /index.php?url=$1.gov [L]
RewriteRule ^([^/]*)\.biz$ /index.php?url=$1.biz [L]
RewriteRule ^([^/]*)\.me$ /index.php?url=$1.me [L]
RewriteRule ^([^/]*)\.asia$ /index.php?url=$1.asia [L]
RewriteRule ^([^/]*)\.me.uk$ /index.php?url=$1.me.uk [L]
RewriteRule ^([^/]*)\.org.uk$ /index.php?url=$1.org.uk [L]
RewriteRule ^([^/]*)\.net.cn$ /index.php?url=$1.net.cn [L]
RewriteRule ^([^/]*)\.org.cn$ /index.php?url=$1.org.cn [L]
RewriteRule ^([^/]*)\.com.cn$ /index.php?url=$1.com.cn [L]
RewriteRule ^([^/]*)\.co.in$ /index.php?url=$1.co.in [L]
RewriteRule ^([^/]*)\.net.in$ /index.php?url=$1.net.in [L]
RewriteRule ^([^/]*)\.org.in$ /index.php?url=$1.org.in [L]
RewriteRule ^([^/]*)\.firm.in$ /index.php?url=$1.firm.in [L]
RewriteRule ^([^/]*)\.gen.in$ /index.php?url=$1.gen.in [L]
RewriteRule ^([^/]*)\.fm$ /index.php?url=$1.fm [L]
RewriteRule ^([^/]*)\.bz$ /index.php?url=$1.bz [L]
RewriteRule ^([^/]*)\.ca$ /index.php?url=$1.ca [L]
RewriteRule ^([^/]*)\.hn$ /index.php?url=$1.hn [L]
RewriteRule ^([^/]*)\.sc$ /index.php?url=$1.sc [L]
RewriteRule ^([^/]*)\.li$ /index.php?url=$1.li [L]
RewriteRule ^([^/]*)\.de$ /index.php?url=$1.de [L]
RewriteRule ^([^/]*)\.dk$ /index.php?url=$1.dk [L]
RewriteRule ^([^/]*)\.jobs$ /index.php?url=$1.jobs [L]
RewriteRule ^([^/]*)\.md$ /index.php?url=$1.md [L]
RewriteRule ^([^/]*)\.th$ /index.php?url=$1.th [L]
RewriteRule ^([^/]*)\.kr$ /index.php?url=$1.kr [L]
RewriteRule ^([^/]*)\.sg$ /index.php?url=$1.sg [L]
RewriteRule ^([^/]*)\.es$ /index.php?url=$1.es [L]
RewriteRule ^([^/]*)\.nl$ /index.php?url=$1.nl [L]
RewriteRule ^([^/]*)\.fr$ /index.php?url=$1.fr [L]
RewriteRule ^([^/]*)\.vc$ /index.php?url=$1.vc [L]
RewriteRule ^([^/]*)\.tw$ /index.php?url=$1.tw [L]
RewriteRule ^([^/]*)\.nr$ /index.php?url=$1.nr [L]
RewriteRule ^\contact.html /index.php?action=contact [L]
RewriteRule ^\index.html /index.php?action= [L]
ErrorDocument 404 /change.php


converted to Lighttpd:

url.rewrite-once = (
"^sitemap/([^/]*)\.html$" => "/sitemap.php?start=$1",
"^([^/]*)\.jpg$" => "/image.php?url=$1",
"^([^/]*)\.com$" => "/index.php?url=$1.com",
"^([^/]*)\.net$" => "/index.php?url=$1.net",
"^([^/]*)\.org$" => "/index.php?url=$1.org",
"^([^/]*)\.la$" => "/index.php?url=$1.la",
"^([^/]*)\.za$" => "/index.php?url=$1.za",
"^([^/]*)\.bg$" => "/index.php?url=$1.bg",
"^([^/]*)\.ng$" => "/index.php?url=$1.ng",
"^([^/]*)\.ec$" => "/index.php?url=$1.ec",
"^([^/]*)\.cd$" => "/index.php?url=$1.cd",
"^([^/]*)\.kw$" => "/index.php?url=$1.kw",
"^([^/]*)\.af$" => "/index.php?url=$1.af",
"^([^/]*)\.na$" => "/index.php?url=$1.na",
"^([^/]*)\.gi$" => "/index.php?url=$1.gi",
"^([^/]*)\.mn$" => "/index.php?url=$1.mn",
"^([^/]*)\.ht$" => "/index.php?url=$1.ht",
"^([^/]*)\.mt$" => "/index.php?url=$1.mt",
"^([^/]*)\.ps$" => "/index.php?url=$1.ps",
"^([^/]*)\.pa$" => "/index.php?url=$1.pa",
"^([^/]*)\.ao$" => "/index.php?url=$1.ao",
"^([^/]*)\.ma$" => "/index.php?url=$1.ma",
"^([^/]*)\.hk$" => "/index.php?url=$1.hk",
"^([^/]*)\.to$" => "/index.php?url=$1.to",
"^([^/]*)\.do$" => "/index.php?url=$1.do",
"^([^/]*)\.cz$" => "/index.php?url=$1.cz",
"^([^/]*)\.al$" => "/index.php?url=$1.al",
"^([^/]*)\.lt$" => "/index.php?url=$1.lt",
"^([^/]*)\.sk$" => "/index.php?url=$1.sk",
"^([^/]*)\.pt$" => "/index.php?url=$1.pt",
"^([^/]*)\.mx$" => "/index.php?url=$1.mx",
"^([^/]*)\.tr$" => "/index.php?url=$1.tr",
"^([^/]*)\.il$" => "/index.php?url=$1.il",
"^([^/]*)\.int$" => "/index.php?url=$1.int",
"^([^/]*)\.by$" => "/index.php?url=$1.by",
"^([^/]*)\.ir$" => "/index.php?url=$1.ir",
"^([^/]*)\.id$" => "/index.php?url=$1.id",
"^([^/]*)\.ar$" => "/index.php?url=$1.ar",
"^([^/]*)\.jp$" => "/index.php?url=$1.jp",
"^([^/]*)\.zm$" => "/index.php?url=$1.zm",
"^([^/]*)\.info$" => "/index.php?url=$1.info",
"^([^/]*)\.ro$" => "/index.php?url=$1.ro",
"^([^/]*)\.no$" => "/index.php?url=$1.no",
"^([^/]*)\.uk$" => "/index.php?url=$1.uk",
"^([^/]*)\.pl$" => "/index.php?url=$1.pl",
"^([^/]*)\.ru$" => "/index.php?url=$1.ru",
"^([^/]*)\.edu$" => "/index.php?url=$1.edu",
"^([^/]*)\.ws$" => "/index.php?url=$1.ws",
"^([^/]*)\.ua$" => "/index.php?url=$1.ua",
"^([^/]*)\.vn$" => "/index.php?url=$1.vn",
"^([^/]*)\.br$" => "/index.php?url=$1.br",
"^([^/]*)\.cl$" => "/index.php?url=$1.cl",
"^([^/]*)\.au$" => "/index.php?url=$1.au",
"^([^/]*)\.eu$" => "/index.php?url=$1.eu",
"^([^/]*)\.hu$" => "/index.php?url=$1.hu",
"^([^/]*)\.in$" => "/index.php?url=$1.in",
"^([^/]*)\.be$" => "/index.php?url=$1.be",
"^([^/]*)\.gr$" => "/index.php?url=$1.gr",
"^([^/]*)\.am$" => "/index.php?url=$1.am",
"^([^/]*)\.at$" => "/index.php?url=$1.at",
"^([^/]*)\.it$" => "/index.php?url=$1.it",
"^([^/]*)\.cc$" => "/index.php?url=$1.cc",
"^([^/]*)\.cn$" => "/index.php?url=$1.cn",
"^([^/]*)\.pk$" => "/index.php?url=$1.pk",
"^([^/]*)\.ly$" => "/index.php?url=$1.ly",
"^([^/]*)\.us$" => "/index.php?url=$1.us",
"^([^/]*)\.tk$" => "/index.php?url=$1.tk",
"^([^/]*)\.tv$" => "/index.php?url=$1.tv",
"^([^/]*)\.tel$" => "/index.php?url=$1.tel",
"^([^/]*)\.mobi$" => "/index.php?url=$1.mobi",
"^([^/]*)\.name$" => "/index.php?url=$1.name",
"^([^/]*)\.gov$" => "/index.php?url=$1.gov",
"^([^/]*)\.biz$" => "/index.php?url=$1.biz",
"^([^/]*)\.me$" => "/index.php?url=$1.me",
"^([^/]*)\.asia$" => "/index.php?url=$1.asia",
"^([^/]*)\.me.uk$" => "/index.php?url=$1.me.uk",
"^([^/]*)\.org.uk$" => "/index.php?url=$1.org.uk",
"^([^/]*)\.net.cn$" => "/index.php?url=$1.net.cn",
"^([^/]*)\.org.cn$" => "/index.php?url=$1.org.cn",
"^([^/]*)\.com.cn$" => "/index.php?url=$1.com.cn",
"^([^/]*)\.co.in$" => "/index.php?url=$1.co.in",
"^([^/]*)\.net.in$" => "/index.php?url=$1.net.in",
"^([^/]*)\.org.in$" => "/index.php?url=$1.org.in",
"^([^/]*)\.firm.in$" => "/index.php?url=$1.firm.in",
"^([^/]*)\.gen.in$" => "/index.php?url=$1.gen.in",
"^([^/]*)\.fm$" => "/index.php?url=$1.fm",
"^([^/]*)\.bz$" => "/index.php?url=$1.bz",
"^([^/]*)\.ca$" => "/index.php?url=$1.ca",
"^([^/]*)\.hn$" => "/index.php?url=$1.hn",
"^([^/]*)\.sc$" => "/index.php?url=$1.sc",
"^([^/]*)\.li$" => "/index.php?url=$1.li",
"^([^/]*)\.de$" => "/index.php?url=$1.de",
"^([^/]*)\.dk$" => "/index.php?url=$1.dk",
"^([^/]*)\.jobs$" => "/index.php?url=$1.jobs",
"^([^/]*)\.md$" => "/index.php?url=$1.md",
"^([^/]*)\.th$" => "/index.php?url=$1.th",
"^([^/]*)\.kr$" => "/index.php?url=$1.kr",
"^([^/]*)\.sg$" => "/index.php?url=$1.sg",
"^([^/]*)\.es$" => "/index.php?url=$1.es",
"^([^/]*)\.nl$" => "/index.php?url=$1.nl",
"^([^/]*)\.fr$" => "/index.php?url=$1.fr",
"^([^/]*)\.vc$" => "/index.php?url=$1.vc",
"^([^/]*)\.tw$" => "/index.php?url=$1.tw",
"^([^/]*)\.nr$" => "/index.php?url=$1.nr",
"^\contact.html" => "/index.php?action=contact",
"^\index.html" => "/index.php?action=",
"ErrorDocument 404" => "/change.php"
)

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved