PDA

View Full Version : Redirection hack request


Areku
06-07-2003, 10:35 PM
Let's c:

I had my forums at www.domain1.com/sitename/forums

Now I transferred them to www.domain2.com/forums

Is there any way to set up VB so ANY request of any page or script (showthread.php, quiz.php, member.php, WHATEVER.php...) to the OLD domain1 URL (whichever parameters you fill in) will lead you to the correct domain?


Tried with REDIRECT PERMANENT directive on Apache, but problem is parameters ARE NOT passed this way, so any1 asking for

http://domain1.com/site/forums/showthread.php?threadid=22222

will be taken to

http://domain2.com/forums/showthread.php

Rhod
06-07-2003, 10:38 PM
You could just write a redirect html and use that

Rhod
06-07-2003, 10:41 PM
To make it simple....here is a code I just wipped up...
<html>
<head>
<title>Forums Have Moved</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--hide from old browsers
var time = null
function move() {
window.location = 'http://www.yoursite.com/'
}
//-->
</script>
</head>

<body bgcolor="#000000"text="#FFFF00" link="#00FF00" vlink="#00FF00" alink="#00FF00" onload="timer=setTimeout('move()',1000)">
<div align="center">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p></p>
<p><b><font face="Arial" color="#FFFF00" size="+2">Boards Have Moved<br>
You will be redirected to : <br>
<a href=http://www.yoursite.com/>http://www.yoursite.com/</a><br>
Click on the link above if it does not automatically forward you<br>
<br></font></b></p>
</div>
</body>
</html>

Areku
06-07-2003, 10:46 PM
Er....

the code you wrote is THE SAME than a simple
"<meta http redirect "timeout; url=url to redirect">"

BUT

I WANT to redirect also the parameters...!

So if a user followed
http://domain1.com/site/forums/showthread.php?threadid=22222

will be taken to

http://domain2.com/forums/showthread.php?threadid=22222


NOTE the ?threadid=22222

Rhod
06-07-2003, 10:54 PM
But if you moved the forums/closed the forums people should not even be able to see thus negating the need for the forward except for the main forward which is a simple redirect that I posted.

You could even just close the boards and on the message tell them where to go for the new forums.

Areku
06-07-2003, 11:02 PM
People still access the site via different URLs formed on different scripts (showthread.php, quiz.php, etc....)

They ALWAYS get the "board closed go to new forums" message, but precisely this is WHY I want the redirection, so instead of "go to mynewdomain2.COM they'll get to the REAL thread/quiz/whatever they were looking for.

Areku
06-10-2003, 05:26 PM
No1?