add scope-rewrite code in module-rewrite