PDA

View Full Version : Swtiched from VB5 to VB4. Now I have 90k not found 404 errors


CnfsdWhtGuy
04-11-2016, 01:31 PM
Just like the title says. I upgraded to VB5 as I was receiving email on the version I had that it had security flaws. I had already paid for the upgrade to 5 so I figured why not. Made the change and had performance issues, template complaints from users, and really a limited number of skins to choose from. Tried to make it work for about a month but I got nothing but negative feedback and a kept running into issues trying to get the site up to bar. I decided to drop back into VB4 again.

When I made the switch to 5 it updated all of our links to SEO friendly ones. When I switched back so did the links. Since then the number of not found 404 errors on google webmaster have sky rocketed. I contacted the support forum on Google webmaster and he recommended creating 301 redirects. He said there was a way to "script" it and save myself time. When investigating further he said it would be best to contact someone at Vbulletin. So here I am.

The site is www.killbillet.com. It is PHP based. It is currently on Version 4.2.3.

This is definitely outside of my expertise so I will likely have a few questions but I learn quickly. Thanks in advance and let me know if you need any more information.

final kaoss
04-11-2016, 06:28 PM
Most likely Google will have to recrawl and reindex the site. In the meantime, create a sitemap and submit it to google via the webmaster tools.

CnfsdWhtGuy
04-12-2016, 01:11 PM
Most likely Google will have to recrawl and reindex the site. In the meantime, create a sitemap and submit it to google via the webmaster tools.

This was submitted about two weeks ago. Since the errors have just increased daily.

--------------- Added 1460474536 at 1460474536 ---------------

Lets start with this. A bunch of member profile pages are showing up as an error because the user page is listed as http://www.killbillet.com/member/62412-Cytel.

The actual user page link is below.

http://www.killbillet.com/member.php?62412-Cytel

How would I make this 301 redirect in bulk to remove this error?

Thanks for any input you can provide.

Dave
04-12-2016, 02:06 PM
You could use the following rewrite rule for a 301 redirect for the URL's you posted:

RewriteEngine On
RewriteRule ^member/([0-9]+)-(.*)$ member.php?$1-$2 [R=301,L]

CnfsdWhtGuy
04-12-2016, 02:38 PM
Dave,

I have a very limited understanding so I am sorry if I am asking stupid questions but would this coding apply to all member accounts then? And would this need to be uploaded to the member.php section of our site?

Thanks in advance.

Dave
04-12-2016, 02:51 PM
It would apply to all the URL's which are constructed as the one in your previous post.
That piece of "code" is supposed to go in a .htaccess file in the root folder of your forum.

In case you don't know how to edit that file:
https://support.hostgator.com/articles/how-to-edit-your-htaccess-file
http://www.genesisclub.training/7532/what-is-an-htaccess-file-and-how-to-edit-it/

Lynne
04-12-2016, 03:42 PM
Dave provided the .htaccess for your members pages, but unfortunately you will not be able to do any rewrites for forums or threads unless you type each one our specifically.

CnfsdWhtGuy
04-12-2016, 05:00 PM
Ok so I drop this in the .htaccess file and any member page that is listed like the one above will have a 301 redirect and in theory should stop showing up as an error on google webmaster correct?

Lynne, So what you are saying is that this will only apply to members pages but every other section won't be fixed correct? so if I take the code above and apply it to the various sections (i.e. forumdisplay.php and showthread.php) it should do the same for those if they are formatted similarly correct? Can you have multiple rules like this in the htaccess file?

By the way this is super helpful. I have been dealing with this for a while and felt like I was getting nowhere. You guys are awesome.

Dave
04-12-2016, 05:28 PM
Ok so I drop this in the .htaccess file and any member page that is listed like the one above will have a 301 redirect and in theory should stop showing up as an error on google webmaster correct?

Lynne, So what you are saying is that this will only apply to members pages but every other section won't be fixed correct? so if I take the code above and apply it to the various sections (i.e. forumdisplay.php and showthread.php) it should do the same for those if they are formatted similarly correct? Can you have multiple rules like this in the htaccess file?

By the way this is super helpful. I have been dealing with this for a while and felt like I was getting nowhere. You guys are awesome.

Correct.

The other old SEO URL's may have a different structure which vBulletin may not support.
For example if the old SEO URL's only contain titles/names and no numbers (which are used to identify the section in vBulletin), there's no way for vBulletin to know what section is supposed to be displayed.

Paul M
04-12-2016, 07:03 PM
There are no known security flaws in 4.2.3, so who exactly sent you this email?

CnfsdWhtGuy
04-12-2016, 07:33 PM
Ok so the next is...

http://www.killbillet.com/forum/rat-rod-general/rat-rods-in-general/32204-best-heat-paint-for-headers

Above is the incorrect link. Below is the correct link.

http://www.killbillet.com/showthread.php?31631-best-heat-paint-for-headers&highlight=heat+paint+headers

This one looks a bit harder... Any advice? Thanks thanks thanks!!!

--------------- Added 1460498265 at 1460498265 ---------------

There are no known security flaws in 4.2.3, so who exactly sent you this email?

When we upgraded in the first place it was from a previous version. Not 4.2.3. I didn't want to have to mess around with upgrading again in the near future. Thats why I made the transition to 5.x. The emails were sent from Vbulletin.

Dave
04-13-2016, 05:28 AM
Just look at the URL structure and my previous rewriterule, you'll see that it's quite easy to make a rewriterule for that.

RewriteRule ^forum/(.*)/(.*)/([0-9]+)-(.*)$ showthread.php?$3-$4 [R=301,L]

However, this will not work to URL's that are constructed differently.
It will only work to URL's which are constructed like: /forum/section-name/subsection-name/threadid-threadtitle

-

Also, you might want to include the following in your .htaccess file:
RewriteBase /
The absolute path is currently used on your site which causes 404 errors.
Or just include a backslash in front of the URL's in the RewriteRules.

CnfsdWhtGuy
04-13-2016, 04:24 PM
I want to understand how this works so I am going to break this down. Hopefully you can confirm/help me understand.

Original redirect - RewriteRule ^member/([0-9]+)-(.*)$ member.php?$1-$2 [R=301,L]

New New redirect - RewriteRule ^forum/(.*)/(.*)/([0-9]+)-(.*)$ showthread.php?$3-$4 [R=301,L]

So the (.*) refers to any written title in a subfolder?

And the ([0-9]+) is any combination of numbers 0-9 in a link?

Does the $ signify the separation from the original link to the new? I almost think of it as the If x is this $(then) Y should be this?

Why is the first rule $1-$2 and the second is $3-$4?

And finally I am assuming this [R=301,L] is what is telling the server it is a redirect. correct?

Dave
04-13-2016, 04:29 PM
RewriteRule ^forum/(.*)/(.*)/([0-9]+)-(.*)$ showthread.php?$3-$4 [R=301,L]

(.*) will match anything.
([0-9]+) will only match numbers of any length.

Whenever there's a match, it will be stored inside of a variable. In this case $3 will be the third match, which is the part which checks for the number. Each part that I made red will be stored in a variable.

The first URL only contains 2 different variables each time, so we only have to extract 2 variables.
The second URL contains 4 different things in the URL which may not be unique, that's why we simply match it with (.*).

RewriteRules and regexes are quite a pain. :)

CnfsdWhtGuy
04-13-2016, 04:47 PM
Perfect. Thanks for breaking it down for me. You are an awesome guy Dave. If there was a service that would allow me to buy you a beer and have it delivered I would. Just saying.

--------------- Added 1460573313 at 1460573313 ---------------

One last question on that last set of coding. That last variable varies between the two links. One has - and the other has +. Does that matter?

--------------- Added 1460573408 at 1460573408 ---------------

and can I just list these in the .htaccess file? Is there a way I have to separate them?

Dave
04-13-2016, 04:57 PM
No problem. :)

Not quite sure what you mean with your first question but regarding your second question, just place the rewriterules under each other and it should work fine.

For example:
RewriteEngine On
RewriteBase /
RewriteRule ^member/([0-9]+)-(.*)$ member.php?$1-$2 [R=301,L]
RewriteRule ^forum/(.*)/(.*)/([0-9]+)-(.*)$ showthread.php?$3-$4 [R=301,L]

CnfsdWhtGuy
04-14-2016, 03:40 PM
Dave,

For the fist question. The $3 and $4 variables we are matching up from the links I sent. The first uses - or dashes to separate words whereas the other style uses the + or plus sign to separate the words. Does that matter at all? Or are they considered the same thing?

Dave
04-14-2016, 03:44 PM
A + being used to separate words is rather odd because a + is considered as a space.

Were you referring to this URL?
http://www.killbillet.com/showthread.php?31631-best-heat-paint-for-headers&highlight=heat+paint+headers

Because the last part is a "highlight" part, that parameter is not required in order for the link to work.

CnfsdWhtGuy
04-15-2016, 05:15 PM
I uploaded your coding and it gave me a 404 error. This is what the link shows...

http://www.killbillet.com/home/killbill/public_html/showthread.php?32204-best-heat-paint-for-headers

Did I do something wrong?

Dave
04-15-2016, 05:25 PM
Did you also add "RewriteBase /" after "RewriteEngine On"?

Lynne
04-15-2016, 05:45 PM
I uploaded your coding and it gave me a 404 error. This is what the link shows...

http://www.killbillet.com/home/killbill/public_html/showthread.php?32204-best-heat-paint-for-headers

Did I do something wrong?
The link has "/home/killbill/public_html" in it. This link works fine - http://www.killbillet.com/showthread.php?32204-best-heat-paint-for-headers So, you added something wrong into your redirect.

CnfsdWhtGuy
04-18-2016, 12:56 PM
Like this?

RewriteEngine On
RewriteBase
RewriteRule ^member/([0-9]+)-(.*)$ member.php?$1-$2 [R=301,L]
RewriteRule ^forum/(.*)/(.*)/([0-9]+)-(.*)$ showthread.php?$3-$4 [R=301,L]

--------------- Added 1460993132 at 1460993132 ---------------

That didnt work... It broke the website. how should it be structured. Thanks!

Dave
04-18-2016, 05:07 PM
You didn't copy it correctly. There's a slash missing after the rewritebase line.

CnfsdWhtGuy
04-18-2016, 08:57 PM
Thanks Dave. Should have spent a bit longer looking at it. I did not include the rewritebase line initially and I just shoved it in this morning without looking at your template. It is up and running now. Thanks! Hopefully this will show less errors tomorrow.

CnfsdWhtGuy
04-20-2016, 12:47 PM
So I have set up the redirects you sent me and I have been waiting to see some of the errors drop off from my google webmaster page but they havent. I even click links for issues they say exist and it works properly. Any idea what I am doing wrong here?

Dave
04-20-2016, 12:55 PM
I'm not that familiar with Google Webmaster Tools but doesn't it take a couple of days?

TheLastSuperman
04-20-2016, 06:45 PM
I'm not that familiar with Google Webmaster Tools but doesn't it take a couple of days?

It can take upwards if not more than 24hrs to update and the data shown can differ from Google Analytics too depending on the last time the site was crawled.

https://support.google.com/webmasters/answer/96568?hl=en#2

CnfsdWhtGuy
04-26-2016, 01:10 PM
Alright guys, I have cleared the que of errors and marked them as fixed. When I log in the next day to see the new errors many of them are working links. I am not sure why it is still giving me an error...

See the picture. It lists the not found errors and the very first link in here is the one below. And it works. Why is it an error?

http://www.killbillet.com/forum/alternative-rat-rods/under-3000-club/26975-the-triplet

https://vborg.vbsupport.ru/external/2016/04/8.png

Dave
04-26-2016, 01:14 PM
The detection date is quite old if you look at the right side of the page. Probably just some leftovers?

CnfsdWhtGuy
04-26-2016, 01:24 PM
Ok so then I am confused. I cleared all of the current errors that were being shown. Why are there still old errors showing up?