Forum Moderators: phranque

Message Too Old, No Replies

Finding my pages without typing .html or .php

(without the php extension)

         

bartainer

3:27 pm on Dec 18, 2005 (gmt 0)

10+ Year Member



Hello,

Happy holidays to all! E.g. I have a page webmasterworld.com/test.php. How is it possible to set up my pages so the person types in only webmasterworld.com/test (without the php extension)? I know it's design 101, but I really forgot!

Thanks.

saoi_jp

1:05 pm on Dec 24, 2005 (gmt 0)

10+ Year Member



The easiest way is to make a directory "test", and put the page in as "index.php".
So
webmasterworld.com/test
will actually be
webmasterworld.com/test/index.php

Another way is to save the file as just "test" (without any extension), and upload it to the server. Your root directory will probably have an .htaccess file. Download it, and add this to the .htaccess file:


<Files test>
ForceType application/x-httpd-php
</Files>

(The word "test" is the name of the file that you want to be treated as PHP. You can also use this for making a standard .html page be treated as PHP, too, in order to put executable PHP code in your .html pages)