Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 01-17-2014, 12:27 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ikopylov View Post
For this part you can not
appeal
attention
?highlight=rules+standings
----------------------
vBseo remove this symbols^ "***"
these characters are not in the old *** link
Therefore, if the redirect server can not find their match
That's the only way how you can make a redirect :
Code:
Options +FollowSymLinks
RewriteEngine On

Redirect 301 /bodybuilding-discussion-news-226/official-mecca-top-6-guess-rules-standings-thread-2013-a-220802/index2.html http://musclemecca.com/threads/220802-***official-mecca-top-6-guess-rules-amp-standings-thread***-2013/page2
Redirect 301 /bodybuilding-discussion-news-226/official-mecca-top-6-guess-rules-standings-thread-2013-a-220802/index3.html http://musclemecca.com/threads/220802-***official-mecca-top-6-guess-rules-amp-standings-thread***-2013/page3
Redirect 301 /bodybuilding-discussion-news-226/official-mecca-top-6-guess-rules-standings-thread-2013-a-220802 http://musclemecca.com/threads/220802-***official-mecca-top-6-guess-rules-amp-standings-thread***-2013
These characters "***" and not enough
therefore, this is the only option as you can make a redirect

---------------------------

There is another option, but it's a bad idea to implement.

Code:
RedirectMatch 301 ^/([a-z-]+)-([0-9]+)/([a-z0-9-]+)-([0-9]+)$ http://musclemecca.com/threads/$4
That code must be placed in the bottom, a set of rules that apply to the triad

Execution sequence for example:
RedirectMatch old thread+post => new thread+post
RedirectMatch old thread+pool => new thread+pool
RedirectMatch old thread => new thread
RedirectMatch my bad kod => you bad thread

Short link will be used:
http://musclemecca.com/threads/220802
This is good for the user, it gets to the desired page, but bad for search engine: it will be a duplicate page.

---------------------------
It's important:
Do not forget that Unix understands this:
Letter
letter

As two different words. In windows it as one word
This was messing me up big time! I was not aware of that.

Thanks!
Reply With Quote
  #12  
Old 01-20-2014, 01:16 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quick question related to this topic:

Here are some rules and some urls I am working on. Keep in mind I have 2 types of urls that need to be redirected as listed below.

PHP Code:
I successfully redirected
forum
-name/threadname-threadid/

using

RewriteRule 
[^/]+/[^/]+-([0-9]+)/ http://musclemecca.com/forums/showthread.php?t=$1 [L,R=301]

Is this correct and safeIt does work but I am unsure if it is totally correct.

##Next

I am trying to create a rule for

/
f226/new-bbing-movie-hits-theatres-may-30-a-191420/

which is 
something like forumid
/threadname-threadid/

I have written  

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

This is only redirecting to forum display like

forumdisplay
.php/226-MuscleMecca-HeadQuarters?t=210661

and not to the correct post 
Last question - How do I deal with thread titles that contain strange characters like ********** ??

Thanks for the help. I have learned alot from this thread.
Reply With Quote
  #13  
Old 01-20-2014, 09:49 PM
ikopylov's Avatar
ikopylov ikopylov is offline
 
Join Date: Aug 2010
Location: Russia
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

through such construction: RewriteRule [^/]+/[^/]+-([0-9]+)/
will be held and processed all requests
images, smilies, links, all...

I do not understand why to create this url?

This is a very slow speed to open all site pages
vBulletin 4its very slow, why it make more slow?

I am testing with pinddom.tools:
1mb page without redirects download 4-5sec
1mb page with several redirects download 7-8sec

Search engines perfectly understand short url: showthread.php?t=123456

Redirects should be used only in emergencies
Reply With Quote
2 благодарности(ей) от:
RichieBoy67, tbworld
  #14  
Old 01-20-2014, 09:56 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks friend. I agree but this is an emergency. We have over 30,000 not found urls in Google and almost 2,000 server errors caused by broken urls.

I am just trying to get some of those not found urls pointing to the right place again.

I agree though that the rule I used was not wise. That is why I am here. To learn from the best and htaccess is my weakest point.
Reply With Quote
  #15  
Old 01-20-2014, 10:04 PM
ikopylov's Avatar
ikopylov ikopylov is offline
 
Join Date: Aug 2010
Location: Russia
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Apparently I do not understand you very well
Nevertheless previous post has the right to life

Write me an old and a new link
I'll write you a redirect rule
Reply With Quote
  #16  
Old 01-20-2014, 10:38 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I agree.

I am having a problem with urls like this

PHP Code:
http://musclemecca.com/members/74229-tkD

to

http
://musclemecca.com/member.php/74229-tkD 
Thanks mate!
Reply With Quote
  #17  
Old 01-21-2014, 06:51 AM
ikopylov's Avatar
ikopylov ikopylov is offline
 
Join Date: Aug 2010
Location: Russia
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Create new folder musclemecca.com/member/
Add this .htaccess to new folder member

Code:
Options +FollowSymLinks
RewriteEngine On
RedirectMatch 301 ^/members/([0-9]+)-([A-Za-z0-9-]+)$ http://musclemecca.com/member.php/$1-$2
If not work:
Stop all RewriteRule(s) in root and check again.
Friend, I wrote to you several times: do not use RewriteRules use RedirectMatch
Reply With Quote
Благодарность от:
RichieBoy67
  #18  
Old 01-21-2014, 08:17 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks,

Ok this works. I forgot I already had the wrong htaccess in a members directory. This works. Starting to finally cut down on the error messages. Much appreciated! I am removing rewrite rules for redirect matches too.

I think I am finally starting to pick up on your method here. It is not what most do but it seems faster and better in my opinion. Great work on using this.

Am I on the right track here with this?

PHP Code:
Options +FollowSymLinks
RewriteEngine On
RedirectMatch 301 
^/mecca-bodybuilding-discussion-news-226/([A-Za-z0-9-]+)-([0-9-]+)$ http://musclemecca.com/showthread.php/$1-$2


This is to redirect urls like this that were under f226 but now under /mecca-bodybuilding-discussion-news-226 but are now displayed as http://musclemecca.com/showthread.php like below:

http://musclemecca.com/mecca-bodybuilding-discussion-news-226/art-atwood-dead-37-years-old-219676/

too

http
://musclemecca.com/showthread.php/219676-Art-Atwood-dead-at-37-years-old 
Reply With Quote
  #19  
Old 01-21-2014, 04:02 PM
ikopylov's Avatar
ikopylov ikopylov is offline
 
Join Date: Aug 2010
Location: Russia
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RichieBoy67 View Post
Thanks,

Ok this works. I forgot I already had the wrong htaccess in a members directory. This works. Starting to finally cut down on the error messages. Much appreciated! I am removing rewrite rules for redirect matches too.

I think I am finally starting to pick up on your method here. It is not what most do but it seems faster and better in my opinion. Great work on using this.

Am I on the right track here with this?

PHP Code:
Options +FollowSymLinks
RewriteEngine On
RedirectMatch 301 
^/mecca-bodybuilding-discussion-news-226/([A-Za-z0-9-]+)-([0-9-]+)$ http://musclemecca.com/showthread.php/$1-$2


This is to redirect urls like this that were under f226 but now under /mecca-bodybuilding-discussion-news-226 but are now displayed as http://musclemecca.com/showthread.php like below:

http://musclemecca.com/mecca-bodybuilding-discussion-news-226/art-atwood-dead-37-years-old-219676/

too

http
://musclemecca.com/showthread.php/219676-Art-Atwood-dead-at-37-years-old 

Code:
RedirectMatch 301 ^/([A-Za-z0-9-]+)-([0-9]+)/([A-Za-z0-9-]+)-([0-9]+)/$ http://musclemecca.com/showthread.php/$4-$3
Reply With Quote
Благодарность от:
RichieBoy67
  #20  
Old 01-21-2014, 05:25 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Ikopylov, I was way off but I am almost there. I understand the rules somewhat but certain things still confuse me.

One last question and I will not ask for anything else. You have already helped me correct thousands of not found urls. Thank you.

The only thing I really need to finish now is some urls that use the following

PHP Code:
http://musclemecca.com/f226/mr-olympia-2013-updates-info-thread-232742/

to another forum in the advanced friendly format

http
://musclemecca.com/showthread.php/232742-***Mr-Olympia-2013***-Updates-and-info-thread! 
Can you write one for me so I can figure out the rest?

Will I have to create directories for each of these like"f226"??

Thanks again! I think this should do it,
Rich
Reply With Quote
Reply


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 11:36 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.04396 seconds
  • Memory Usage 2,301KB
  • Queries Executed 13 (?)
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
  • (4)bbcode_code
  • (5)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete