PHP Files and Webpages |
PHP Files and Webpages |
Mar 26 2007, 08:03 PM
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* |
Mar 27 2007, 03:17 PM
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. |
|
|
|
bigtrey PHP Files and Webpages Mar 26 2007, 08:03 PM
mipadi Only if they're PHP files. Mar 26 2007, 08:41 PM
bigtrey what did you mean by that? Mar 26 2007, 08:45 PM
mipadi Well, they should only have a .php extension if th... Mar 26 2007, 09:00 PM
bigtrey well none of my .htm files have scripts on them. y... Mar 27 2007, 04:54 AM
mipadi A .php file is generally a webpage that mixes in a... Mar 27 2007, 07:36 AM
bigtrey l0l okay gotcha. sorry bout the dumness. so if i s... Mar 27 2007, 02:27 PM
mipadi No, usually files that don't have an extension... Mar 27 2007, 03:04 PM
bigtrey so basically save it as what, this: http://www.exa... Mar 27 2007, 03:09 PM
bigtrey okay, l0l at the last comment. i get all that now,... Mar 27 2007, 03:22 PM
mipadi QUOTE(bigtrey @ Mar 27 2007, 4:22 PM) oka... Mar 27 2007, 03:25 PM
bigtrey okay whoo! thanks, so i'ma name my blog li... Mar 27 2007, 03:28 PM
mipadi Yeah. Mar 27 2007, 03:52 PM
bigtrey YES! Thanks again ! One more question, w... Mar 27 2007, 03:57 PM
mipadi Then just put a file called index.htm at the root ... Mar 27 2007, 04:05 PM
bigtrey so could i put it for example in my cutenews/examp... Mar 27 2007, 04:08 PM
mipadi QUOTE(bigtrey @ Mar 27 2007, 5:08 PM) so ... Mar 28 2007, 11:11 AM
bigtrey okay I did that. I also made my blog link index.ph... Mar 28 2007, 01:52 PM
mipadi Sounds good to me. Mar 28 2007, 02:55 PM
bigtrey okay i got it, thanks Mar 29 2007, 05:15 AM![]() ![]() |