If you can't set a new 'default page' on your server, using a header('Location:
...') will simulate the same thing.
I believe the web server sends an error 302 (like a 404 when page isn't
found) for saying that a page has moved and redirect the browser automatically
to the new page.
So like I
Tuesday, January 17, 2006, 10:54:21 AM, [EMAIL PROTECTED] wrote:
If you can't set a new 'default page' on your server, using a
header('Location: ...') will simulate the same thing.
Not really. Sending a Location: header says, this page is temporarily
moved and the browser has to send a 2nd
I think you can do it using Location header. There is no need to use
refresh.
get more info at
http://www.weberdev.com/Manuals/PHP/function.header.html
Thanks
Richard Correia
On 1/17/06, Michael Hulse [EMAIL PROTECTED] wrote:
Hello,
What would be the best way to get a page variable like
Hey Steve,
I know it can be done easily using apache rewrite rules. Since this user may
not know it, I suggested location header.
Rich
On 1/17/06, Steve Clay [EMAIL PROTECTED] wrote:
Tuesday, January 17, 2006, 10:54:21 AM, [EMAIL PROTECTED]:
If you can't set a new 'default page' on your
Wow, thanks for all the great advice everyone! Very good info... all of
your suggestions have been very helpful. I appreciate it.
• I would have never thought to just require() the page... good idea.
:)
• Still checking out server options... waiting for info from client on
that tip.
• Mod
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
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,
On Jan 16, 2006, at 2:14 PM, [EMAIL PROTECTED] wrote:]
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!
Great! Thanks for the
You could also check to see if $_GET['page'] contains a value, and if it does
not, then redirect it. Something like this:
if($_GET['page'] == ''){
header(Refresh: 0; URL=http://www.domain.com/start.php?page=home;);
}
Granted that isn't validating the $_GET['page'] variable input for
On Mon, 2006-01-16 at 14:20 -0800, Michael Hulse wrote:
On Jan 16, 2006, at 2:14 PM, [EMAIL PROTECTED] wrote:]
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
I'm confused...
why does everyone use a refresh??? According to me, that's not what a
refresh is supposed to be used for (!). Why don't use a
header('Location: http://www.domain.com/start.php?page=home'); for it?
It's more in-line with RFC's
- tul
Ray Hauge wrote:
You could also check to see
On Jan 16, 2006, at 2:24 PM, Ezra Nugroho wrote:
You probably want to check mod_rewrite.
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
Ah, looks useful! Thanks for link, reading about it now. :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Jan 16, 2006, at 3:27 PM, M. Sokolewicz wrote:
I'm confused...
why does everyone use a refresh??? According to me, that's not what a
refresh is supposed to be used for (!). Why don't use a
header('Location: http://www.domain.com/start.php?page=home'); for it?
It's more in-line with RFC's
Monday, January 16, 2006, 5:14:49 PM, tg-php wrote:
Should just be a matter of adding start.php to your defaults list in
whatever priority order you want.
Apache's .htaccess:
DirectoryIndex start.php index.php index.html
In start.php:
// instead of redirecting, just set page
if
14 matches
Mail list logo