Some major websites have pages on their site indexed in ways like:
Amazon.com/%SEO%/dp/%product_serial_number%/
No matter what you put in the %SEO% section, it brings up the same page. So how do they reroute all requests regardless of path to a central script like that?
I'd like to use example.com/module/id#/command/ such as MyDomain.com/user/3/edit_profile/
As a secondary issue, is there a specific name for this technique?
I tried various things with .htaccess such as
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URL} !^(.*)?
RewriteRule ^(.*)$ http://example.com/?$1 [L,R=301]
but any changes there seem to change what is displayed in the address bar in a way that doesn't happen with the pretty URIs from these commercial sites. I want the central script to handle the page generation, but I don't want to alter what is displayed in the address bar.
I'm currently passing everything through GET, like example.com/?some/path/ But that is NOT a good solution.