Fixed old links

Forum announcements are posted here. New cool features, scheduled backups and maintenance, you name it.
Post Reply
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Fixed old links

Post by Jorg »

Hi Guys,

I added a php redirect script to the old wxWidgets forum location that will guide all old links to the new one;

Links like;

http://wxwidgets.solidsteel.nl/viewtopi ... 1f16d2c089

Won't end up in a 404 error, but present the new link now. I do know know how to parse the part behind the viewtopic.php?....... so when someone knows how I will adjust the script. It looks like this now;

Code: Select all

<?php

$url = "http://wxforum.shadonet.com";

header ("Location: $url");
?>
Which is the most PHP I ever written in my life ;-)
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
lowjoel
Part Of The Furniture
Part Of The Furniture
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel »

Code: Select all

$_SERVER['QUERY_STRING'];
ima PHP guru 8) haha, nah, i just picked up experience from the last 1 year or so (ive coded blog systems CMSes photo galleries... even nearly a forum and a chat room, as well as a shoutbox :D)
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

So what is the complete php code plus begin / end tag that I have to use? That will also fix the old links in the forum. I could make a DB query for that but hey since I still own the domain name, this will do for a while.

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia »

Code: Select all

<?php
	$newUrl = "http://wxforum.shadonet.com";
	$requestUrl = $HTTP_SERVER_VARS['REQUEST_URI'];
	header("Location: ".$newUrl.$requestUrl);
?>
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Thanks I will implement this when I get home.

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
lowjoel
Part Of The Furniture
Part Of The Furniture
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel »

HTTP_SERVER_VARS is deprecated, use $_SERVER.
Post Reply