Forum Moderators: phranque
And this is true with some, but not all hosting companies.
My .htaccess files are quite similar on all of those servers, so I would assume it would not be "my" configuration causing this.
Would server handler matter (CGI vs. Apache)... or something else?
Thanks
Each URL should bring up different content. Non-valid URLs should return a 404 status.
Having said that, you can set up a 301 redirect so that if the wrong name is requested, the user is redirected to the correct version of the URL.
I use that to redirect "/(index¦home¦default)\.(html?¦php[45]?¦[ja]spx?¦cfm)" to just "/" for all requests.
I link to "/" as that is the "correct" URL. If you request one of the other versions then you are redirected and still get to see the content.
So, the likely cause is a difference in your server configurations.
As g1smd recommends, any given 'page' or object on your site should be directly-accessible at one and only one URL; Any and all variations of domain, subdomain, FQDN (a period following the domain, as in "example.com."), port number (e.g. "example.com:80"), URL-path, path fragment (also called "named anchor") and query-string should be 301-redirected to the canonical URL. This includes "index.html" versus "/", and upper- and lower-case variations of the URL-path and the parameter order in the query-string as well.
To be clear, a URL is composed as <sub-subdomain(s)>.<subdomain>.<domain>.<top-level domain><period indicating FQDN><port-number>/<URL-path>#<fragment>?<query-string>. The sub-sub-domains, subdomain, FQDN, port number, URL-path, fragment identifier, and query string are all optional in different cases.
Jim
All of my pages within any site are HTML, period. It is just that from time to time, I would see a request for a single HTM page on some, no referrer.
Now, with this better understanding that a request for a non-existing HTM should return 404, I wonder if one of my (shared) hosting packages that returns HTML on HTM request is actually a problem?
Thanks