PHP Files and Webpages |
PHP Files and Webpages |
![]()
Post
#1
|
|
![]() talent on another level ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 746 Joined: Oct 2006 Member No: 475,735 ![]() |
So I finished all the webpages for my website in Dreamweaver. All of them right now are saved as .htm files. I am using CuteNews, so would it be best to save them as .php files?
|
|
|
![]() |
*mipadi* |
![]()
Post
#2
|
Guest ![]() |
If a pathname doesn't have an extension, most browsers interpret it as a directory (or folder) name. So take this URL:
http://www.mydomain.com/mysite The name of the folder is mysite. Now, when a browser gets an address like that, it searches for a file in the folder mysite with the name index.{htm, html, asp, php, pl, ...}; if it doesn't find one with the basename index and an appropriate extension, it repeats the process with default.{htm, html, asp, php, pl, ...}. So in the case of the above URL, you are actually looking at a file named http://www.mydomain.com/mysite/index.html. So if you want a page to load by going to http://too-fresh.net/general/domain/, then you have to place a file named index.html in all of those directories. And yes, before some smart-ass can butt in, you can also accomplish this using Apache mod_rewrite rules, but that's too advanced for this situation. |
|
|
![]() ![]() |