You mean something like this => http://evilcity.hellous.com/index.evil
This can be accomplished using a .htaccess file
This is what I have in my .htaccess file in the root directory:

AddType application/x-httpd-php evil
DirectoryIndex index.evil index.php index.html

    so that directs all .evil extentions to the php.exe excutable?

      yea!, thats what yahoo does! but to do that, you need to put all the scripts on one page(index.php) right?By the way is Ends Design your company?

        Well, you don't have to put all the script in the index page, what most people do is to use the index page as a switch so it includes different files depending on the action.

        Consider this:

        $menu = $_GET['menu'];
        switch ($menu) {
          case 'menu1':
            include 'header.php';
            include 'myscript.php';
            include 'footer.php';
            break;
          case 'menu2':
            // do something else
            break;
          default:
            // what else is there to do?
        }
        

          good idea, so in for you cases, are those cases going to be all on the index file? For example, when u put do something, did you want the index file to redirect to another page or excute whatever script was under the case?

            Yes, the switch statement above will have to be in the index page.
            Notice that the script does not redirect, but includes.

              the switch statment thing works wonders...used it many times...

              and yes, Ends Design is my company 🙂

                Write a Reply...