I think I got it working. In my .htaccess , I had RewriteRule ^([^/\.]+)$ city/$1.php , so when url had %20 appended, it looked for %20.php in city folder and threw error. Since I didn't really need that rewriterule and removed it, and it worked. Another problem I am facing is to rewrite url with www pre-fixed. I got it working when URL is just domain.com, and redirect with 301 to
www.domain.com. But when URL is domain.com/city/Sydney.php for example, it wouldn't redirect to
www.domain.com/city/Sydney.php. Any suggestion!!
My current rewrite rule is
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
thanks