RewriteEngine On RewriteCond %{REQUEST_URI} !^index.php RewriteRule ^([^/]+\.php)$ http://site.com/foo/index.php?page=$1 [R,L,QSA] Query: http://site.com/foo/Services.php? Result: Not Found The requested URL /foo/Services.php was not found on this server. Apache/2.0.58 (Unix) Server at site.com Port 80