Added rewrite basennand also trying to move rewrites to directory