Forum Moderators: coopster
The question is when the site is spidered will the search engine list the file as PHP or HTML.
The dilemma is if it just spiders the directory it will see PHP files. On the other hand if it follows the links it will see HTML pages.
BTW none of the pages have a? at any time.
Does it matter that the spider could potentially see a php or html page?
Will the scenario have any impact on the ranking?
Are there other issues that I need to be made aware of?
Once you slap up that index page it effectively blocks the spider from seeing the directory listing, and you then direct the spider around your files via the links you place on the page.
So if all your site linking is consistently referring to the html pages I can't see a problem.
Thank you both for the feedback.
Longhaired Genius, I agree with you that it would be a waste of time if there is any expectation to help with search engine ranking.
There are two reasons that it was done. The first (and less significant) is to assure those users who habitually type index.html as part of the url. Granted, it is a small percentage, but still a percentage.
The more significant reason is for security.
The more significant reason is for security.
Security? You mean so that hackers won't know that you are running PHP? This "security through obscurity" has little value.
Sorry for sounding like a broekn record, but the best solution, if you're going to the trouble, is to have your "canonical urls" (shortest url that points to a given resource) have no extensions at all.
- same security benefit (albeit tiny)
- shorter urls
- urls are completely technology independent
What about people who type
h**p://example.com/path/to/file.php
h**p://example.com/path/to/file.html
h**p://example.com/path/to/file.htm
instead of
h**p://example.com/path/to/file/
You can easily use mod_rewrite or some PHP scripting to allow all four to work.
Remember
Choose URIs Wisely [w3.org] and Cool URIs Don't Change [w3.org] (see the footnote)