Re: Best way to do this: www.domain.com?page=var

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On your web server you can configure 'default pages'.  Apache and *nix type servers seem to favor the "index.html" type default pages while Microsoft's IIS goes for the "Default.htm" just to be different.  But you can add default pages to a list in the order you want them accepted.

For instance, if you use PHP a lot (which I think we all do :) but you have a lot of directories that just have static HTML in them, you might have:

index.html
index.php

(or vice versa) as your default pages list.  If it doesn't find any of those in the directory being accessed, then you should get your good old 404 error.


Should just be a matter of adding "start.php" to your defaults list in whatever priority order you want.


I think that'll do it for ya.   If you're going through an ISP, they still may have a way that you can set your defaults, possibly through .htaccess or some other Apache type prefs setting mechanism.

Good luck!

-TG


= = = Original message = = =

Hello,

What would be the best way to get a page variable like this:

www.domain.com?page=home

to show up when a user types in:

www.domain.com

My current fix is to have this:

header("Refresh: 0; URL=http://www.domain.com/start.php?page=home";);

... on a index.php page on the root.

Is there a way I can do this and avoid having a page that just does 
redirection?

Thanks for help.
Cheers,
Micky


___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux