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=john4
Our requirements are:
The URL should continue to show
www.example.com/john4
even though it was redirected towww.example.com/index.php?Agent=john4
If 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
iffile.php
existed on the server.www.example.com/pages
would go towww.example.com/pages/index.php
if thepages
directory exists).