...

View Full Version : header('Location: ') question



penny94
11-04-2012, 11:58 PM
So I have a header('Location: ') in my script and it works fine if I enter something like


header('Location: profile.php ')

It will go to www.example.com/profile.php

But I am trying to make it go to the homepage of the site which is just www.example.com. I don't want it to show index.php or default.php.

So my question is what do I need to put in header('Location: ') for it to direct back to the homepage www.example.com

Thanks

tangoforce
11-05-2012, 12:34 AM
http://www.example.com would do the trick nicely.

Inigoesdr
11-05-2012, 12:34 AM
You can either use the full domain, or "/":

header('Location: http://www.example.com/');
// or
header('Location: /');



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum