Shoutbox

PHP redirection - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: PHP redirection (/showthread.php?tid=21322)

PHP redirection by Wabz on 02-11-2004 at 04:19 PM

Hey Bit of a n00bish question but if ya dont know ya dont know

How do you redirect from say www.likethat.org.uk to likethat.org.uk/folder using php i'm intending to use index.php to redirect for me ?  Any ideas please


RE: PHP redirection by fluffy_lobster on 02-11-2004 at 04:33 PM

If you just want likethat.org.uk/ to imitate likethat.org.uk/folder, just make index.php the following:

code:
<?php include('./folder/index.php'); ?>

That, by the way, will also preserve all http POST/GET requests to /
RE: PHP redirection by KeyStorm on 02-11-2004 at 05:16 PM

Best use the following:

code:
header("HTTP/1.1 301 Moved Permanently");
header("Location: [URL]");
header("Connection: close");

Put in [URL] the destination

Edit: Fortgot to say that's for when you're changing the server
RE: PHP redirection by fluffy_lobster on 02-11-2004 at 05:33 PM

Heh, this was already sorted on IRC... I gave him the options and he wanted it to mimic (i.e. include), not redirect :p

btw, Keystorm: your sig needs to have stripslashes() done on it - you're listening to "L'Inverno" but the leading slash hasn't been removed ("L\'Inverno")


RE: PHP redirection by KeyStorm on 02-11-2004 at 05:36 PM

quote:
Originally posted by fluffy_lobster
your sig needs to have stripslashes() done on it
yeah, right. I noticed some days ago... But I'm too f****** (Swear Blocker :grin:) laaaazy

*Huh, casually Dreamweaver open 8-)
RE: PHP redirection by fluffy_lobster on 02-11-2004 at 05:46 PM

Heh, could be worse, could be really unsecure like Lopardo's


RE: PHP redirection by KeyStorm on 02-11-2004 at 06:03 PM

OK, changed!
Btw this &#344; (should be the R with that inverse circumflexe) should be a Ø, is there a function to rearrange this?


RE: PHP redirection by KeyStorm on 02-11-2004 at 06:07 PM

Well and if you knew how to do it with TT fonts 8-), it'd be great :D


RE: PHP redirection by fluffy_lobster on 02-11-2004 at 06:16 PM

The two are interlinked... the default php fonts don't support unicode so they show a different letter... I'm not sure what the rule is about how it substitutes.

You might as well switch to ttf, it's very simple - see http://uk2.php.net/manual/en/function.imagettftext.php for the documentation.