More rewrite friendly URL generation (needs testing, please report)