Lots of bad links

Whaturmuva

Eating the souls of children
So I've noticed that at least in the Warcraft sections (probably more), most of the stickies full of links are well.....useless. The links in the stickies are all outdated and either send you to a bad page or just redirect to the main page.

I suggest that the links are located (I assume in the archive) or just ditch the stickies all together because I'm sure guests do not enjoy having dead links because that would definitely make me not want to join if the information I wanted was not available.

Anyways just wanted to point this out to try and be helpful :deadhorse:
 

ChrisH36

Guy with Most Posts on Quiet Board.
The thing is that some of the guides are fine. Just what happened was when the server was transferred, the HTML setup for the documents changed. I totally forgot about them until now.


Anyways, half the links are fixed. And the outdated ones are removed from the sticky. My orc one is almost done, I just need to actually sit down and continue with it.
 

x42bn6

Retired Staff
The redirecting isn't really done smartly but it's difficult as the previous URLs didn't encode the forum in them - i.e. they were similar to showthread.php?threadid=696969, while the new schema thanks to vBSEO has /forum-name/696969-your-favourite-sex-position.html. The prefixing of /forums isn't so much of a problem.

I think I might have found a better way, though, stay tuned...

[edit] Yeah, I think I have it - I think we simply have to rewrite ./showthread.php and ./postreply.php (and any link without /forums in it) with, say, ./forums/showthread.php, passing all the $_GET and $_POST information through PHP. Such things shouldn't be that hard.

[edit] Yeah, I think I might have conked something up. It's a .htaccess directive:

Code:
Redirect 301 /showthread.php http://www.battleforums.com/forums/showthread.php
Redirect 301 /newthread.php http://www.battleforums.com/forums/newthread.php
One line each for every broken file.

I don't have my own webspace so I couldn't test it. The reason we can't use:

Code:
Redirect 301 / http://www.battleforums.com/forums/
is because it will end up in an infinite loop. However, there are only a couple of files to redirect in vBulletin.

This should also pass on any $_GET information. There's no need to pass on any $_POST information, I believe; it's not related to links.

The only thing I couldn't figure out to do is the fact that it doesn't respect the active domain - i.e. http://battleforums.com/showthread.php will redirect to http://www.battleforums.com/forums/showthread.php breaking cookies. I suspect it's not a good idea to redirect non-www. URLs to www. URLs as it confuses search engines. This can be fixed by employing a more complicated regular expression but without a web server, I don't want to try.

And of course, I hope kinkarso doesn't just stuff those lines in and hope for the best.*
 

kinkarso

ex-admin
The redirecting isn't really done smartly but it's difficult as the previous URLs didn't encode the forum in them - i.e. they were similar to showthread.php?threadid=696969, while the new schema thanks to vBSEO has /forum-name/696969-your-favourite-sex-position.html. The prefixing of /forums isn't so much of a problem.

I think I might have found a better way, though, stay tuned...

[edit] Yeah, I think I have it - I think we simply have to rewrite ./showthread.php and ./postreply.php (and any link without /forums in it) with, say, ./forums/showthread.php, passing all the $_GET and $_POST information through PHP. Such things shouldn't be that hard.*
The thing is, forums/showthread.php doesn't seem to work. If you just add a /forums/ in front of the broken links, it doesn't exactly redirect you to the new vBSEO version of the URLs. I'm pretty sure anyways.
 

x42bn6

Retired Staff
The thing is, forums/showthread.php doesn't seem to work. If you just add a /forums/ in front of the broken links, it doesn't exactly redirect you to the new vBSEO version of the URLs. I'm pretty sure anyways.
No, the problem is that previous URLs looked like:

http://www.battleforums.com/showthread.php?t=23

or

http://www.battleforums.com/showthread.php?threadid=23

We simply need to pump up a /forums into the URL and those .htaccess directives should do that.

I assume you have console access, so navigate to the root (/var/www - I don't know where you put all your stuff), and run this:

Code:
touch zomg.php
chmod 755 zomg.php
cd forums
touch zomg.php
chmod 755 zomg.php
Then put this into .htaccess:

Code:
Redirect 301 /zomg.php http://www.battleforums.com/forums/zomg.php
Then http://www.battleforums.com/zomg.php should redirect with HTTP 301 to http://www.battleforums.com/forums/zomg.php. Then it should work with all GET variables (try and see what http://www.battleforums.com/zomg.php?zomg=zomgzomgzomg redirects to).

And, of course, remove those dummy files afterwards:

Code:
rm zomg.php
cd forums
rm zomg.php
*
 

Darkmatter

Battle God
More like nerd. :]

Or robot. But you're my robot hero.

Also, most of the stickies are outdated content wise, and patch wise. We can easily update them if the mods/smods kick in some help for the sections.
 

ChrisH36

Guy with Most Posts on Quiet Board.
vB removed using a Query String, so they changed the HTML Setup to accomondate for these changes.

The Neutral hero ones I wrote are fine, since there were no changes to these units as of the patches I wrote them in. The Tinker one is really a discussion thread that people can contribute too (at the time, me and Revelade liked using that UU hero). We are now at 1.22 for Wc3.

The only real unit that recieved a major change was the Knight. Got 3 base damage and .1 seconds cut off its attack speed. Guides need to be rewritten, either by someone who plays Wc3 a lot of that race, or by members who want to do it.
 
Top