I have found the adaptations for other web servers that could help:
- *Lighthttp:*
$HTTP["host"] == "yourdomain.com" {
server.document-root = "/path/to/your/public_html/"
url.rewrite-once = (
"^/forums/(sitemap.*\.(xml|txt)(\.gz)?)$" =>
"/forums/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1",
"^(/forums/(admincp|modcp|clientscript|cpstyles|images|customavatars)/.*)$"
=> "$1",
"^(/favicon\.ico|/robots\.txt|.*clear\.gif)$" => "$1",
"^/forums/(.+)\?(.*)$" => "/forums/vbseo.php?$2",
"^/forums/(.+)$" => "/forums/vbseo.php"
)
}
- *Zeus: (ouch, this one is like an script language)*
match URL into $ with ^/forums/((urllist|sitemap).*\.(xml|txt)(\.gz)?)$
if matched then
set URL = /forums/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1
goto END
endif
match URL into % with ^/forums/(admincp|modcp|clientscript|cpstyles|images)/
if matched then goto END
match URL into % with ^(.+)\?(.*)$
if not matched then
match URL into % with ^(.+)$
endif
map path into SCRATCH:path from %1
look for dir at %{SCRATCH:path}
if exists then goto DIR_EXISTS
look for file at %{SCRATCH:path}
if exists then
match URL into $ with ^/forums/(.+\.php)
if matched then
set URL = /forums/vbseo.php
endif
else
match URL into $ with ^/forums/([^\?]+)
set URL = /forums/vbseo.php
goto END
endif
DIR_EXISTS:
- *ngix (another script-link mixed with regular expressions)*
location /forums/ {
rewrite ^/forums/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$
/forums/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 break;
if ($request_filename ~ "\.php$" ) {
rewrite ^/forums/(.*)$ /forums/vbseo.php break;
}
if (!-e $request_filename) {
rewrite ^/forums/(.*)$ /forums/vbseo.php break;
}
}
- *ISS*
[ISAPI_Rewrite]
#RewriteCond Host: (?:www\.)?yourdomain.com
RewriteRule ^/forums/((urllist|sitemap).*\.(xml|txt)(\.gz)?)$
/forums/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
#RewriteCond Host: (?:www\.)?yourdomain.com
RewriteCond URL ^/forums/(?!avatars|attachments|iconimages).*
RewriteRule
^([^\?]*\.(?:gif|swf.*|jpg|png|css|xml|js|htm|txt|zip)(?:\?(.*))?)$ $1 [I,L]
#RewriteCond Host: (?:www\.)?yourdomain.com
RewriteCond URL
^/forums/(?!admincp/|modcp/|clientscript/|cpstyles/|images/|search\.php).*
RewriteRule ^/forums/(.+?)(?:\?(.*))?$ /forums/vbseo.php [L]
2008/7/25 Miguel Angel Ajo Pelayo <[EMAIL PROTECTED]>:
>
> Hi all :-)
>
> I'm in the process of migrating all my forums to cherokee, because my dual
> xeon
> server is getting exhausted and I think cherokee can do a lot there (at
> least that's
> what the tests I've done say...)
>
> I use the following software: Vbulletin forums, and in the top of it vbseo,
> that
> it's a software that rewrites urls and makes some other optimizations.
>
> For example
>
> http://www.foroselectronica.es/showhread.php?t=1321 ---> becomes:
>
> http://www.foroselectronica.es/f106/favor-ayuda-urgente-circuito-leds-alta-1321.html
>
> They do that using rewrite rules from apache (they also have scripts for
> lightweight servers
> too, but the cherokee version is still missing)
>
> The .htaccess is this:
>
> #RewriteBase /
>
> #RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
> #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]
>
> RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$
> vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
>
> RewriteCond %{QUERY_STRING} !vbseourl=
> RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
> RewriteRule ^(.*\.php)$ vbseo.php?vbseourl=$1 [L,QSA]
>
> RewriteCond %{REQUEST_FILENAME} !\.(jpg|gif)$
> RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]
>
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME}
> !^(admincp|modcp|clientscript|cpstyles|images)/
> RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]
>
>
> And this is what I unserstand from it:
>
>
> - first (active) line rewrites* urllist / sitemap .xml/.txt* to the
> sitemap generator
> - the next 3 rewrite* *.php* to vbseo.php?vbseourl=$1 whenever
> QUERY_STRING don't contain vbseourl= or REQUEST_URI doesn't start with
> admincp/ modcp/ chat or cron
> - the next 2 rewrite *archive/** to vbseo.php?vbseourl=$1 whenever the
> filename doesn't finish by .jpg or .gif
> - the last 4 rewrite whatever it's left *(.+)* to vbseo.php?vbseourl=$1
> whenever the filename isn't an existing file, a directory, doesn't start
> with admincp, modcp, clientscript, cpstyles or images
>
>
> I know it's a lot of work, but I don't know how to start exactly, so any
> help would be appreciated :-)
>
>
>
> --
> Miguel Angel Ajo Pelayo
> http://optimizacionweb.es
> +34 91 120 1798
> +34 636 52 25 69
> skype: ajoajoajo
>
--
Miguel Angel Ajo Pelayo
http://optimizacionweb.es
+34 91 120 1798
+34 636 52 25 69
skype: ajoajoajo
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee