Skip to content

Instantly share code, notes, and snippets.

@nicomen
Created December 8, 2016 17:30
Show Gist options
  • Save nicomen/17f53ba6902cfd18acb8b94522e06239 to your computer and use it in GitHub Desktop.
Save nicomen/17f53ba6902cfd18acb8b94522e06239 to your computer and use it in GitHub Desktop.
...
PerlModule SmartGiant
PerlOptions +SetupEnv
RewriteEngine on
ProxyPreserveHost On
RewriteCond %{HTTP_HOST} !^m.solfaktor
RewriteRule ^/(step1|step1_meta|asset/|services/|layouts/)(.*)$ http://%{HTTP_HOST}.prod.reisegiganten.net/$1$2 [P,L]
RewriteCond %{QUERY_STRING} tab=flight
RewriteRule ^.*$ http://%{HTTP_HOST}.prod.reisegiganten.net/flight [P,L]
...
Example URLs:
http://m.restplass.no.test.r12.no/step1?orig=OSL&dest=BCN&dep=2016-12-10&return=2016-12-10&adt=1&sort=quality
http://www.restplass.no.test.r12.no/
http://www.restplass.no.test.r12.no/?tab=flight
http://www.restplass.no.test.r12.no/?tab=flight
http://www.restplass.no/step1_meta?searchType=RT&depLocCode=NO|CI|OSL&retLocCode=ES|AP|BCN&depDateMem=2016-12-10&retDateMem=2016-12-10&adt=1&chd=0&numberOfDisplayedSegments=2&sc=1&searchCnt=1
@alonnberg
Copy link

checked it quick. i know some calls come from the domains "flyg.solfaktor.se" and "fly.solfaktor.(no/dk)". otherwise you are rock solid :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment