add "isRewriteActive"

add "isRewriteActive" to check if Rewrite engine is active and fix
"getRelativeURIToRoot"
add isRewriteActive