fix active tab in main menu
implement x-accel-redirect