anyone can please tell me why some URLs does not show the file and its .php extension?
tanx...
| SitePoint Sponsor |
anyone can please tell me why some URLs does not show the file and its .php extension?
tanx...

This is because most servers are set up to deliver "index.html" or "index.php" if the URL points to a directory. For example, on this forum, if you put http://www.sitepoint.com/forums/ into the URL, you will get http://www.sitepoint.com/forums/index.php
The other possibility is that they are using some rewriting method, most likely mod_rewrite on Apache. This is quite a popular method for making "clean" URLs. Wordpress is an example of something that uses it a lot.



What do you mean exactly?
If I understand your question right, you're asking why, for example, http://www.domain.com/page.html or http://www.domain.com/file/ are linking to a PHP file or a file parsed by PHP while the URL doesn't tell you whether it's a file with extension .php or not?
If I'm wrong, rephrase your question please.
I'll try to answer the interpreted question:
You can add a Apache handler to a specific filetype -e.g. .html- to parse as PHP. Or you can rewrite a URL using htaccess and the mod_rewrite engine, so http://www.domain.com/page.php would become http://www.domain.com/page.html or http://www.domain.com/page/
FOR SALE: 1 set of morals, never used, will sell cheap
well let me rephrase it, basically i would like to have my URL appear without showing the file and its extension. for example to have http://www.domain.com/folder/ instead of http://www.domain.com/folder/page.php
please explain what should i do?
tanx

Did you not read my first post? Just change page.php to index.php and it will work unless your server is set up in an unusual way.
If you need this to work for several different pages, then you will need to look into mod_rewrite
many thanks Raffles i read and got it. take it easy.
Bookmarks