Re: Header Redirect
| From: | Jim Lucas | Date: | Tue, 27 May 2008 16:16:51 +0000 |
| Subject: | Re: Header Redirect | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274738@lists.php.net to get a copy of this message | ||
Yui Hiroaki wrote:
HI! I would like to have some question. For example, I am in http://example.com/?12324242 I would like to REDIRECT from http://example.com/?1312323232 to http://example.com/ I can REDIRECT from http://example.com/index.php to http://example.com Please do tell me how I can redirect! This is the sample what I test below! <?php if ($_SERVER['REQUEST_URI'] == '/index.php') { header("HTTP/1.1 301 Moved Permanently"); header("Location: http:///example.com/"); exit(); } ?> Regards, YuiWell, in your example code, you have 3 forward slashes... What that a typo in your example, or is that cut/paste from your script? -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare