What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP redirection

PHP redirection
Author: Message:
Wabz
Elite Member
*****

Avatar
Its Groovy Baby!

Posts: 3459
Reputation: 29
39 / Male / Flag
Joined: Jan 2003
O.P. PHP redirection
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
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
02-11-2004 04:19 PM
Profile E-Mail PM Web Find Quote Report
fluffy_lobster
Veteran Member
*****

Avatar
Posts: -2

Posts: 1391
Reputation: 23
36 / Male / Flag
Joined: Nov 2002
RE: PHP redirection
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 /
02-11-2004 04:33 PM
Profile E-Mail PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: PHP redirection
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

This post was edited on 02-11-2004 at 05:19 PM by KeyStorm.
02-11-2004 05:16 PM
Profile E-Mail PM Web Find Quote Report
fluffy_lobster
Veteran Member
*****

Avatar
Posts: -2

Posts: 1391
Reputation: 23
36 / Male / Flag
Joined: Nov 2002
RE: PHP redirection
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")
02-11-2004 05:33 PM
Profile E-Mail PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: PHP redirection
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-)

This post was edited on 02-11-2004 at 05:38 PM by KeyStorm.
02-11-2004 05:36 PM
Profile E-Mail PM Web Find Quote Report
fluffy_lobster
Veteran Member
*****

Avatar
Posts: -2

Posts: 1391
Reputation: 23
36 / Male / Flag
Joined: Nov 2002
RE: PHP redirection
Heh, could be worse, could be really unsecure like Lopardo's
02-11-2004 05:46 PM
Profile E-Mail PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: PHP redirection
OK, changed!
Btw this &#344; (should be the R with that inverse circumflexe) should be a Ø, is there a function to rearrange this?

This post was edited on 02-11-2004 at 06:04 PM by KeyStorm.
02-11-2004 06:03 PM
Profile E-Mail PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: PHP redirection
Well and if you knew how to do it with TT fonts 8-), it'd be great :D
02-11-2004 06:07 PM
Profile E-Mail PM Web Find Quote Report
fluffy_lobster
Veteran Member
*****

Avatar
Posts: -2

Posts: 1391
Reputation: 23
36 / Male / Flag
Joined: Nov 2002
RE: PHP redirection
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.
02-11-2004 06:16 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On