Options +ExecCGI
RewriteEngine On
RewriteRule ^jin\.cgi - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},PT]
RewriteRule ^lp[a-z]{2}\.php - [PT]
RewriteRule ^php/ - [PT]
RewriteRule ^themes/ - [PT]
RewriteRule ^skins/ - [PT]
RewriteRule ^templates/ - [PT]
RewriteRule ^satellites/ - [PT]
RewriteRule ^mce/ - [PT]
RewriteRule ^files/ - [PT]
RewriteRule ^aff.js - [PT]
# for compatibility with Fantasos:
RewriteRule ^fantasos_aff.js aff.js [NE,L,QSA]
# SITE SPECIFIC
RewriteRule (^.*/ak)$ $1/ [L]
# SITE SPECIFIC; cut www. due to security problem in IE
RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^.* http://%1%{REQUEST_URI} [L,R]
RewriteRule ^$ main.html [NE,L]
RewriteRule ^ds/?$ ds/area_redirector.html [NE,L]
# package order links
RewriteRule ^([0-9]+)([a-z]{2})/(r?[0-9]+)/order/? order/init_package.html?pack_id=$1&signature=$2&aff_id=$3 [NE,L,QSA]
RewriteRule ^([0-9]+)([a-z]{2})/order/? order/init_package.html?pack_id=$1&signature=$2 [NE,L,QSA]
# shopcart links:
RewriteRule ^([0-9]+)([a-z]{2})/(r?[0-9]+)/shopcart/?([0-9]*) order/init_shopcart.html?pack_id=$1&signature=$2&aff_id=$3&sc_cat=$4 [NE,L,QSA]
RewriteRule ^([0-9]+)([a-z]{2})/shopcart/?([0-9]*) order/init_shopcart.html?pack_id=$1&signature=$2&sc_cat=$3 [NE,L,QSA]
# package minisite link
RewriteRule ^([0-9]+)([a-z]{2})/site/? minisite/main.html?pack_id=$1&signature=$2 [NE,L,QSA]
# package homepage links
RewriteRule ^([0-9]+)([a-z]{2})/([0-9]+)/? package/homepage.html?pack_id=$1&signature=$2&aff_id=$3 [NE,L,QSA]
RewriteRule ^([0-9]+)([a-z]{2})/? package/homepage.html?pack_id=$1&signature=$2 [NE,L,QSA]
# orders, sales and transactions
RewriteRule ^order\-([a-z0-9]{8})([0-9]+) order/process.html?order_id=$2&signature=$1 [NE,L,QSA]
RewriteRule ^thank\-([a-z0-9]{8})([0-9]+)/download/([a-z]+[0-9]+)/ action/Jin/Download/fetch.html?source=$3&sale_id=$2&signature=$1 [NE,L,QSA]
RewriteRule ^thank\-([a-z0-9]{8})([0-9]+)/invoice-([0-9]+) action/Jin/InvoicePDF/get.html?invoice_id=$3&sale_id=$2&signature=$1 [NE,L,QSA]
RewriteRule ^thank\-([a-z0-9]{8})([0-9]+) order/thank.html?sale_id=$2&signature=$1 [NE,L,QSA]
RewriteRule ^pg\-feedback/([a-z]+/[a-z]+/[a-z0-9]+).cgi action/Jin/PGate/Persistent/feedback.cgi?feedback=$1 [NE,L,QSA]
# funnels
RewriteRule ^funnels/([0-9]+)(/[a-z0-9]+)? action/Jin/Funnel/Web/display.html?step_id=$1&visit_code=$2 [NE,L,QSA]
# API
RewriteRule ^api/([\.0-9]+)(/([a-z0-9]+))? action/Jin/APIGate/call.cgi?apiversion=$1&apicall=$3 [NE,L,QSA]
# back compatibility with old API
RewriteRule ^action/Jin/APIUser/([a-z]+) action/Jin/APIGate/call.cgi?apiversion=1.0&apicall=$1 [NE,L,QSA]
RewriteRule ^action/Jin/Order/Web/api_([a-z_]+) action/Jin/APIGate/call.cgi?apiversion=1.0&apicall=$1 [NE,L,QSA]
# affiliate instant bonuses
RewriteRule ^affbonus\-([0-9]+) master/plugins/affinbs/customer_page.html?aff_id=$1 [NE,L,QSA]
# jv products
RewriteRule ^jvprod\-([0-9]+)/([a-z_]+) action/Jin/JveventProd/get.html?jvprod_id=$1&f=$2 [NE,L,QSA]
# invitations
RewriteRule ^invite\-([a-z0-9]{8})([0-9]+)(/([0-9]+))? auth/register.html?inv_id=$2&signature=$1&referer=$4 [NE,L,QSA]
RewriteRule ^action/Jin/PGate/mod_([a-z0-9]+)/return.cgi action/Jin/PGate/feedback.cgi?feedback=return/pgt/$1 [NE,L,QSA]
# for back compatibility with JVM1 (subscriptions initiated in JVM1) and with JVM2 v1.6 and earlier
RewriteRule ^action/Jin/PGate/mod_([a-z0-9]+)/ipn.cgi action/Jin/PGate/feedback.cgi?feedback=notify/pgt/$1 [NE,L,QSA]
# content series
RewriteRule ^content/(.*) action/Jin/ContentSeries/get.html?url=$1 [NE,L,QSA]
RewriteRule ^(.+) jin.cgi/$1 [QSA,NE,L]