vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Ditching Vbseo for Friendly URLs (https://vborg.vbsupport.ru/showthread.php?t=301248)

Akyeame Kwame 08-16-2013 07:58 AM

Ditching Vbseo for Friendly URLs
 
I'm looking to ditch vbseo in favor of the friendly URLs due to server overload vbseo causes.
However, vbseo generates
Code:

forums/my-forum-name/64854-my-thread-name.html
while friendly URLs (mod rewrite) generates
Code:

forums/threads/64854-My-Thread-Name.html
Is there a way via .htaccess or otherwise to make the friendly URLs pull my forum name as vbseo does rather than the generic threads? I'm looking to avoid link rot as, right now, all traffic from previously high indexing threads are being redirected to forumhome.

Any assistance would be GREATLY appreciated.

motorhaven 08-16-2013 12:08 PM

You can make an .htaccess to 301 redirect the old VBSEO urls to the new URLs. "Link juice" will follow to the new URLs this way. On VBSEO's forums there is an example .htaccess to do this. I used it on a forum of mine when I ditched VBSEO.

Akyeame Kwame 08-16-2013 12:19 PM

I've found dozens of threads but none that had the example .htaccess
Not to be a pest but any url or an example of your own .htaccess would be most appreciated.

motorhaven 08-16-2013 01:39 PM

<a href="http://www.vbseo.com/blogs/mert-goekceimam/how-uninstall-vbseo-238/" target="_blank">http://www.vbseo.com/blogs/mert-goek...all-vbseo-238/</a> - this includes an example .htaccess. The first post has 3 rewrites which handle about 95% of URLs.

My own .htaccess would be useless to you. I don't have my forums in the standard /forums sub-directory plus I had to do many modifications to their rules to handle two sets of URLs due to the previous site owner changing the forum software more than once and not forwarding URLs. I have close to 2 dozen rewrite rules due to this.

Akyeame Kwame 08-16-2013 02:10 PM

This is most helpful! I really appreciate it.
2 dozen rewrites? Sounds like you're quite the .htaccess/httpd.conf guru!
I appreciate the time and the response. I hope to be away from this huge resource hog ASAP.

motorhaven 08-16-2013 02:43 PM

If you run into any URLs the rules I linked to do not rewrite let me know. I'll be happy to help, but those are a very good starting point. All total I probably have about 60 rules, the bulk of those designed to closely inspect headers to block out rogue crawlers which disguise themselves as fake browsers.

Akyeame Kwame 08-16-2013 03:26 PM

I'm up and running vbseo-free and I feel like I just got out of jail!
My threads are redirecting correctly, but I need blogs, forums and member profiles/albums
I'd love to see what you've implemented to block out rogue crawlers. I suspect a great deal of my issues with vbseo's load may have been caused by crawlers and spambots.

Will these work?

Code:

RewriteRule ^forum([0-9]+)\.html$ forumdisplay.php?f=$1 [L,R=301]

RewriteRule ^thread([0-9]+)\.html$ showthread.php?t=$1 [L,R=301]

RewriteRule ^blogs/$ blog.php [L,R=301]

Also, now I'm back to vb default URLs, if I decide to go to friendly URLs will my "link juice" be protected? (i.e. vbseo links -> standard links in httpd.conf -> friendly urls)

motorhaven 08-16-2013 03:47 PM

1 Attachment(s)
Those .htaccess rules should work fine with friendly URLs. Matt Cutts from Google in his blog says Google will follow several levels of 301 redirects just fine, but recommended to keep it around 2-3. So you'll be okay.

Can't share the .htacces rules for the bots. Not yet at least. It's part of an overall package I'm developing which includes a dynamically generated robots.txt file (different versions of the file for different crawlers with rules you set for each). I can post a screen shot of what's under way though. :) It also has mechanisms for "trapping" and reporting to you any bad bot which slips past the .htaccess rules and falls into a directory which humans never see on their browser screen. It then modifies .htaccess on the fly to block out newly trapped bots. Optionally the trap can have a CAPTCHA to allow humans through with strange browsers who may have been blocked, though I have this turned off on my site because in a year's time only 1 human was mistakenly taken to the CAPTCHA.

Akyeame Kwame 08-16-2013 03:54 PM

This looks quite impressive. A potential mod of the month candidate if/when you release it.

The showthread worked for me as did the blogs, but I'm still at a loss for forumdisplay, members and albums. Any assistance there would be much appreciated. I appreciate your time and effort in helping me to get free of vbseo.

motorhaven 08-16-2013 05:59 PM

Give me a "before" example URL and the "after" new destination you want to redirect to, and I'll write up a rewrite rule for you.

Akyeame Kwame 08-16-2013 06:21 PM

Sure,

Before:
Code:

http://www.mysite.com/forums/my-forumname/
After:
Code:

http://www.mysite.com/forums/forumdisplay.php?f=45
Before:
Code:

http://www.mysite.com/forums/members/my-username.html
After:
Code:

http://www.mysite.com/forums/member.php?u=1
Before:
Code:

I'm not exactly sure what this looked like before I switched to dynamic URLs but it was similar to how the rest of them are.
After:
Code:

http://www.mysite.com/forums/album.php?albumid=230
Basically I'm going for Standard URLs however those would look for forum display.
Standard URLs:
showthread.php?t=12345
Basic Friendly URLs:
showthread.php?1234-Thread-Title
Advanced Friendly URLs:
showthread.php/1234-Thread-Title
Mod Rewrite Friendly URLs:
threads/1234-Thread-Title

motorhaven 08-19-2013 08:00 AM

Sorry I didn't reply sooner, I was off for the weekend :)

So, you did not have VBSEO settings where the forum id was anywhere in the URL? For example:

Code:

http://www.example.com/forums/107-This-Is-A-Forum\.html
If not, then it requires a few more rules but it's very doable. For each forum add the following to .htaccess

Code:

RewriteRule ^my\-forumname/ http://www.mysite.com/forums/forumdisplay.php?f=45 [L,R=301]
On the right side of the rule, replace "45" with the forum id. On the left side of the rule, anywhere there is a period, dash, ( or ) in the forum name, you'll need to precede it with \

For example:
Code:

http://www.mysite.com/forums/my-forum-(name)-example.html would look like this:

RewriteRule ^my\-forum\-\(name\)\-example\.html http://www.mysite.com/forums/forumdisplay.php?f=45 [L,R=301]

Rules for members and albums are going to depend own how you had VBSEO setup. Best way to determine it is to look at your server log files and copy all "404" error files to a text file. If you have SSH shell access (command prompt) on the server here's how, assuming it uses standard log file format:

cat logfilename | grep -E '" 404 ' > errorexamples.txt

It will copy the error file entries to a text file named errorexamples.txt. Save that to your local computer and paste some examples here (or PM them to me). Replace your site name with something else before pasting it here.

Akyeame Kwame 08-19-2013 08:05 AM

I appreciate the reply. I'll be in and out on errands today, but I did just want to confirm that I'm seeing this and I'll try to work on it. My threads are up with 301s but it looks like I'm taking quite a hit on visits and visitors from google since the initial ditch according to Google Analytics. Getting my rules up to speed ASAP should help. I appreciate it once again and I'll be back on soon!

RichieBoy67 10-28-2013 08:26 PM

I have posted this elsewhere and I am sorry for the duplicates but this seems to be the thread for this..

Trying to redirect old Vbseo urls to Vbulleton mod rewrite urls..


Old ones were like this

PHP Code:

http://musclemecca.com/f226/mr-olympia-2013-updates-info-thread-232742/index13.html#post3178011 

New ones are this

PHP Code:

http://musclemecca.com/threads/232742-***Mr-Olympia-2013***-Updates-and-info-thread! 

Does anyone have a real answer that is helpful to fixing this type of url to redirect?
trying to redirect urls.

TheLastSuperman 10-28-2013 10:49 PM

Quote:

Originally Posted by RichieBoy67 (Post 2456885)
I have posted this elsewhere and I am sorry for the duplicates but this seems to be the thread for this..

Trying to rtedirect old Vbseo urls to Vbulleton mod rewrite urls..


Old ones were like this

PHP Code:

http://musclemecca.com/f226/mr-olympia-2013-updates-info-thread-232742/index13.html#post3178011 

New ones are this

PHP Code:

http://musclemecca.com/threads/232742-***Mr-Olympia-2013***-Updates-and-info-thread! 

Does anyone have a real answer that is helpful to fixing this type of url to redirect?
trying to redirect urls.

https://vborg.vbsupport.ru/showthrea...30#post2456930 :cool:

RichieBoy67 10-29-2013 12:50 AM

You are talking about viewing vbseo on the cache? Yeah,have tried that. I really did not want to remove but was having key issues due to their site being down.


All times are GMT. The time now is 03:28 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01106 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete