My site currently forces all non-www. pages to use www.Ultimately, I am able to handle all unique subdomains and parse correctly but I am trying to achieve the following (ideally with mod_rewrite):When a consumer visits www.example.com/john4, the server processes that request as:www.example.com?Agent=john4Our requirements are:The URL should continue to show www.example.com/john4 even though it was redirected to www.example.com/index.php?Agent=john4If a file (of any extension OR a directory) exists with the name, the entire process stops an it tries to pull that file instead:For example: www.example.com/file would pull up (www.example.com/file.php if file.php existed on the server. www.example.com/pages would go to www.example.com/pages/index.php if the pages directory exists).
Is it possible to mod_rewrite BASED on the existence of a file/directory and uniqueID?
php;mod rewrite;htaccess