|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello,
Does anyone have an idea of how wikipedia makes files without file extensions open in browsers correctly. If I create a HTML file and save it without the file extension .html it will open correctly in Internet Explorer but not in Netscape or Mozilla.
__________________
Best Regards, Randy |
|
|||
|
Quote:
really? can you give some example...
|
|
|||
|
It is actually pretty easy. We do it as well. Makes for nice clean URL's.
The problem with giving examples is there are different requirements for different versions of apache. But you will basically want to create a PHP file that will pull information from your database. From there you will want to save the file without a file name. For example: test.php would be saved as just test. From there you would put a set of lines like this in your .htaccess file or in your httpd.conf file if you had access to that: <Files test> ForceType application/x-httpd-php </Files> Now your test file would need to parse the URL properly and then use the extra "directories" to pass as parameters to the query or whatever else you wanted to do. Such as this: www.test.com/test/var1/var2/var3 $chunk = explode("/", $_SERVER['PATH_INFO']); Then you can reference each different variable as: $chunk[1] = var1 $chunk[2] = var2 $chunk[3] = var3 etc.. From there just use that information as parameters in your Query so you pull the right data from your database. It is pretty easy and there is a tiny bit of information on the web relating to this, but it is out there. Good luck, Fred |
|
|||
|
if you make a folder names say "specials" and have a index.html file in there you can link to say:
h t t p ;// yourdomain.com/special you will see the contents of that index.html If you would want it to go to another location, just put a redirect in that index.html It is a simple solution but it works. |
|
||||
|
Quote:
If you are asking how a web page that should be called "www.domain.com/pagename.html" but is called "www.domain.com/pagename" (not a directory), the answer is that some browsers are more forgiving than others. For example, if you do not close a tag correctly in a web page's code (e.g. a table cell), that page will break in some but not other browsers. Hope that helps. |
|
||||
|
This is somewhat the case, but there is another factor on the server side. Wikipedia for example does not use file extensions, but all of their pages display properly in all major browsers. The reason is that the file extension is irrelevant on web documents. The server includes a header that tells the browser how the file should be rendered - as an image, a text file, a pdf file, a web page, etc. If you do not take special measures to cause the server to label files without extensions as web pages, the server will say that they are plain text. Some browsers will display plain text files containing HTML as web pages, others display the files as plain text.
__________________
The best way to learn anything, is to question everything. |
|
|||
|
Very Cool...
As per the suggestions: I created a .htaccess file with one line: ForceType application/x-httpd-php uploaded .htaccess to test directory then I created an html file and saved it with out a file extension to the test directory Thanks for the cutting edge information everybody!!
__________________
Best Regards, Randy |
|
|||
|
Does the .htaccess line
ForceType application/x-httpd-php Does that mean the browser will see the file as a php page? Then would: ForceType application/x-httpd-html the browser see as an html?
__________________
Best Regards, Randy |
|
|||
|
'ForceType text/html' should do that.
Last edited by activeco; 02-15-2008 at 07:41 PM. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to converter video file into a flash file ,with effect? | andy_lucky | Flash Discussion Forum | 0 | 04-04-2006 12:37 PM |
| Windows 2000 Slow with File Open and File Save Dialog Boxes | steve0 | IT Discussion Forum | 2 | 09-15-2005 06:27 PM |
| Dreamweaver: Error accessing file...bad file path | mimsymc | Graphics & Design Discussion Forum | 6 | 07-10-2005 09:43 PM |
| Do you know about file extension FLM | kiumars | Flash Discussion Forum | 7 | 04-10-2004 06:45 AM |
| changing file extension on home page | iain | Search Engine Optimization Forum | 5 | 03-29-2004 09:34 AM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |