Added more URL handling into rewrite rules