Adding rewrites and index