Fix for url rewrite issue 

this fixes an issue that caused firefox to loop forever