Jump to content

PHP functionality in .htm via .htaccess


kurt.santo

Recommended Posts

I have been adviced to upload a .htaccess file with the following entry: "AddType application/x-httpd-php .php .html" to my new domain space to allow php (MySQL) functionality inside a "normal" .htm page. It is said to be better to save files as .htm than .php with regard to SEO. I have never worked with .htaccess and wondered is someone has experience in this field to share (pros/cons). This would be great!Kurt

Link to comment
Share on other sites

.htm vs .php for seo. No difference really. Except .php indicates a dynamically created page and .htm doesn't. In theory this helps search bots read your website better. But i dont find any difference..htaccess can be written in notepad. Just save it as .htaccess. Double check it has saved as .htaccess and not as a .txt file, as notepad automatically does that to files where you just type in a filename to save it.But i wouldn't bother making .htm pages read mysql content. Just leave it as .php.:)

Link to comment
Share on other sites

Search engines don't care about the extension as long as the content is readable.
Thank you for your feedback. I appreciate your opinions and better leave that for now (kind of glad you are saying that, cause I am going through a massive learning curve at the minute and wasn't to happy about the prospect to make some more nightshifts reading about .htaccess). Maybe one day...Kurt
Link to comment
Share on other sites

Thank you for your feedback. I appreciate your opinions and better leave that for now (kind of glad you are saying that, cause I am going through a massive learning curve at the minute and wasn't to happy about the prospect to make some more nightshifts reading about .htaccess). Maybe one day...Kurt
Actually, I have one more question: Just read that it does not matter if .htm or .php (as you told me already), but only as long as it is a clean url. I have to pass parameters from sidebar (in url actually only id). Does this really influence the seach engines negatively? Could I pass the parameters in a different way? Or should I go back to consider .htaccess? Am confused right now...Kurt
Link to comment
Share on other sites

I doubt it negatively affects anything. Google is run by people who are involved in the open source community and internet programming in general, and we are not developing in a vacuum. The internet is a dynamic and very human place. Google is going to make an effort to support sites like Sourceforge, Mozilla, etc, and sites that use products like osCommerce, CubeCart, Wordpress, etc. All of these sites and products are run by PHP and it wouldn't make any sense for a search engine (especially Google) to penalize them for that, being that PHP is also an open source project. You do want as many keywords as you can put in your URL, that will improve the ranking, but aside from keywords it doesn't matter what else is there, I really doubt that any search engine would penalize a page with a bunch of info in the querystring, as long as it has the necessary keywords.

Link to comment
Share on other sites

I doubt it negatively affects anything. Google is run by people who are involved in the open source community and internet programming in general, and we are not developing in a vacuum. The internet is a dynamic and very human place. Google is going to make an effort to support sites like Sourceforge, Mozilla, etc, and sites that use products like osCommerce, CubeCart, Wordpress, etc. All of these sites and products are run by PHP and it wouldn't make any sense for a search engine (especially Google) to penalize them for that, being that PHP is also an open source project. You do want as many keywords as you can put in your URL, that will improve the ranking, but aside from keywords it doesn't matter what else is there, I really doubt that any search engine would penalize a page with a bunch of info in the querystring, as long as it has the necessary keywords.
That is great! Will leave it with .php. I also saw on the Apache website that they do not recommend using .htaccess (only it is really needed). They say if you really do need to make any changes you should do so in the config file (where obviously with a hosted site you won't have access to)... Thanks again...Kurt
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...