I Website had posted a thread in another for5um about an hour ago on this very same subject. And yet I am still confused.
When cunstructing a Dynamic Website should one use index.php or index.html ? It was said that index.html is better for SEO reasons.
So with that being said. I guess I'm confused on just how to use Php for a Dynamic Website using the .html extension. I know one uses a .htaccess file, but what else does one use, I mean how do you make an index.html work with Php?
Honestly i wouldnt worry too much about it. If you are creating a php page then it will be easier to stick with the .php file extension. This does tell malicious users that you are using php and it may be worse from an seo point of view (im not an seo expert but i seriously wouldnt count on it making too much of a difference) but the problems arent big enough to worry about.
Honestly i wouldnt worry too much about it. If you are creating a php page then it will be easier to stick with the .php file extension. This does tell malicious users that you are using php and it may be worse from an seo point of view (im not an seo expert but i seriously wouldnt count on it making too much of a difference) but the problems arent big enough to worry about.
Search engines could care less what extension your pages use. They only care about the content. It could be difficult to secure proper hosting that allows you to change the parsed extension to html and doing so could also cause greater undue strain on the server (especially in shared hosting environments). It is much easier (and the standard way to do things) to keep the extension as php.
Search engines could care less what extension your pages use. They only care about the content. It could be difficult to secure proper hosting that allows you to change the parsed extension to html and doing so could also cause greater undue strain on the server (especially in shared hosting environments). It is much easier (and the standard way to do things) to keep the extension as php.
I was going to use an index.php with an .htaccess extension that would take index.php and make it www.mysite.com. What is your take on that?
It could be difficult to secure proper hosting that allows you to change the parsed extension to html and doing so could also cause greater undue strain on the server (especially in shared hosting environments).
I dont think this advice is 100% right.
A) Any host that allows you to use .htaccess will allow you to parse html as php.
B) The strain on the server is the same as simply processing a php page. If your shared hosting can do that then it will be able to process .html pages as php.
A) Any host that allows you to use .htaccess will allow you to parse html as php.
B) The strain on the server is the same as simply processing a php page. If your shared hosting can do that then it will be able to process .html pages as php.
Thank you Ryan.... You all are great teachers....
Ryan, question for you. What is your take on me wanting to use the php extension but then using htaccess to rewrite the extension to mysite.com ?
These pages are all seen as different urls, despite them having exactly the same content in most cases. Google has got better at deciding which version to use over the past 12 months but you can still run into problems.
To solve this issue simply add the following to your htaccess file:
A) Any host that allows you to use .htaccess will allow you to parse html as php.
B) The strain on the server is the same as simply processing a php page. If your shared hosting can do that then it will be able to process .html pages as php.
a) This may or may not be the case depending on the enabled .htaccess options at the server level
b) True, except that each html page that is not php also requires parsing. In a hosting environment where you pay by the proccessing/memory utilization it may be unwise to have php parse all html files.
As another option you could do as was suggested above and leave the files as php but use a rewrite rule if the html doesn't exist to point to a php file of the same name. Though I'm still wondering why you would want to have an html extension for parsed server-side content in the first place.
a) This may or may not be the case depending on the enabled .htaccess options at the server level
b) True, except that each html page that is not php also requires parsing. In a hosting environment where you pay by the proccessing/memory utilization it may be unwise to have php parse all html files.
As another option you could do as was suggested above and leave the files as php but use a rewrite rule if the html doesn't exist to point to a php file of the same name. Though I'm still wondering why you would want to have an html extension for parsed server-side content in the first place.
The search engines don't care what the URL is as long as each URL is unique. This could be yoursite.com/somePage.php?contentID=asd or yoursite.com/page/asd. Having a .html extension will gain you nothing as far as SEO goes.
Bookmarks