View Full Version : Moving the forums to another directory + redirecting in index.php ??
stark427
03-04-2003, 10:29 AM
Hello all.
I'm planning to install VBHome lite but prior to this I have some simple (I hope) questions on 2 things.
I now have my forums at the root directory of my domain name.
so it is:
www.mydomain.gr
I want to move the forum to :
www.mydomain.gr/forum
I've been told that the only thing I have to so is to create the FORUM directory and move all the files and dirs into this...
Then just update the forum URL at the admin panel.
is that right?
Something else.
That will leave me with a blank root page.
So, before I install VBHome lite, I want to make an index.php page (to put it at the root) that will be redirecting to the /forum/index.php .
How can I do this?
I mean, Can I do this just by opening Notepad, creating a simple page - putting a javascript redirect script at the HEAD and saving it as index.php ???
Is this all I have to do?
thanx in advance.
Xenon
03-04-2003, 10:34 AM
moving forum: yes, it will work with the steps you mentioned :)
your new redirect index.php:
<?php
header("Location: forum/index.php");
?>
that should be all :)
Just move the files to the dir and update the url in you admin cp. Then stick this in a .php file and name it index.php to redirect:
<?php
header ("Location: forum/index.php" );
exit;
?>
Xenon, you beat me this time ;)
Xenon
03-04-2003, 10:37 AM
Anime, not only this time :p ;)
well you know what they say, great minds think alike :p. And i will beat you next time *sets up bot to monitor xenon's surfing activitys* ;)
stark427
03-04-2003, 10:52 AM
Thank tou guys :D
I appreciate it.
stark427
03-04-2003, 08:57 PM
[edited]
I have made the changes and everything seems ok.
One problem only :
In some posts I have links to other posts/forums, within the forum.
They don't include the directory "forum" so they lead to non-existant locations ....
I can fix those that are in the board by adding the word "forum".
But I know some other sites have links to some specific subforums of my site.
So in order for those outbound links to work, I'm trying to find a way so that everytime someone tries to go to such a link (which leads to nowhere) he would be redirected to the main page of my site.
Could this be done?
any ideas?
thanx
Xenon
03-05-2003, 06:56 AM
hmm, it would be easier to use a replacement of all those old links ;)
the_sisko has released such a hack, maybe it can help you :)
stark427
03-05-2003, 07:59 AM
Originally posted by Xenon
hmm, it would be easier to use a replacement of all those old links ;)
the_sisko has released such a hack, maybe it can help you :)
Xenon you mean this?
https://vborg.vbsupport.ru/showthread.php?s=&threadid=44553
Is there any other way, without hacking?
thanx again
Xenon
03-05-2003, 10:28 AM
well, you can run the nessesary queries within phpmyadmin, without hacking of course :)
stark427
03-05-2003, 11:25 AM
Originally posted by Xenon
well, you can run the nessesary queries within phpmyadmin, without hacking of course :)
Erm thanx - but could you please elaborate more on this? - only if you have the time.
I have used phpmyadmin only 2-3 times for really simple things, but running queries.... no :rolleyes:
If that is of any help :
here is the thread URL of the old forum :
http://www.synthpopavenue.gr/forumdisplay.php?forumid=8
and here is the one from the new :
http://www.synthpopavenue.gr/forum/forumdisplay.php?forumid=8
the steps of what I should do would be much appreciated.
Xenon
03-05-2003, 11:40 AM
normally this would work:
UPDATE post SET pagetext=REPLACE(pagetext,'http://www.synthpopavenue.gr/','http://www.synthpopavenue.gr/forum/')
stark427
03-05-2003, 12:47 PM
I get this error :
SQL-query : [Edit]
UPDATE post SET pagetext=REPLACE(pagetext,\'http://www.synthpopavenue.gr/\',\'http://www.synthpopavenue.gr/forum/\')
MySQL said:
You have an error in your SQL syntax near '\'http://www.synthpopavenue.gr/\',\'http://www.synthpopavenue.gr/forum/\')' at line 1
Xenon
03-05-2003, 01:02 PM
nice...., tell your mysql to describe the error a bit more, because i don't see an error in this query.
stark427
03-05-2003, 01:13 PM
May If I try putting the query in text file and run it from there ?
Xenon
03-05-2003, 01:15 PM
hmm, i don't think it would change anything...
can maybe someone other answer that one, i really don't see why this query should have an error???
stark427
03-05-2003, 01:16 PM
Yes! :D
It worked with the TXT file
thanx Xenon
Xenon
03-05-2003, 01:17 PM
really?
weird... what version of phpmyadmin did you use?
you're welcome :)
stark427
03-05-2003, 01:19 PM
It's version 2.2.0
and MySQL v3.23.55 ( I think)
Xenon
03-05-2003, 01:20 PM
maybe that's it :)
you should perhaps upgrade to the newest phpmyadmin version ;)
but at least it worked now ;)
stark427
03-05-2003, 01:30 PM
I'm on a shared server (unfortunately), so I will tell my ISP to check it out :)
p.s. After the error, when I edited the query, I noticed that then the query was shown with some extra "\"
then when I tried to copy paste here that query - with the extra "\" ... (into code tags) the query showed up normally without the extra "\" :paranoid:
Xfiles? Or what? ! :rolleyes:
Xenon
03-05-2003, 02:25 PM
ahh, that would explain why i don't see the error ;)
it's a bug in vb2 AFAIK, in vb3 this would be corrected (i hope at least ;))
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.