Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2013, 07:58 AM
Akyeame Kwame Akyeame Kwame is offline
 
Join Date: May 2008
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 08-16-2013, 12:08 PM
motorhaven motorhaven is offline
 
Join Date: Jul 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 08-16-2013, 12:19 PM
Akyeame Kwame Akyeame Kwame is offline
 
Join Date: May 2008
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 08-16-2013, 01:39 PM
motorhaven motorhaven is offline
 
Join Date: Jul 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<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.
Reply With Quote
  #5  
Old 08-16-2013, 02:10 PM
Akyeame Kwame Akyeame Kwame is offline
 
Join Date: May 2008
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 08-16-2013, 02:43 PM
motorhaven motorhaven is offline
 
Join Date: Jul 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 08-16-2013, 03:26 PM
Akyeame Kwame Akyeame Kwame is offline
 
Join Date: May 2008
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #8  
Old 08-16-2013, 03:47 PM
motorhaven motorhaven is offline
 
Join Date: Jul 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Attached Images
File Type: jpg Image1.jpg (151.2 KB, 0 views)
Reply With Quote
  #9  
Old 08-16-2013, 03:54 PM
Akyeame Kwame Akyeame Kwame is offline
 
Join Date: May 2008
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 08-16-2013, 05:59 PM
motorhaven motorhaven is offline
 
Join Date: Jul 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:29 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04418 seconds
  • Memory Usage 2,268KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete