Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-13-2013, 10:03 PM
asabet asabet is offline
 
Join Date: Dec 2008
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Please help with album photo URL rewrites after uninstalling vBSEO

Hello,

I was using vBSEO, but since they aren't supporting their product anymore, I uninstalled it. I was using hierarchical type rewrites in vBSEO, and the following rewrite rules are working great for my threads, forums, and members:

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

RewriteRule ^f([0-9]+)/$ http://www.leicaplace.com/forumdisplay.php?f=$1 [L,R=301]

RewriteRule ^members/(.+)/ http://www.leicaplace.com/member.php?username=$1 [L,R=301]

The only problem I'm having is that all the album images embedded in old forum discussions using the old vBSEO URLs are of course not displayed, and that's a big deal since my site is a photography forum.

I need a rewrite rule that will take an vBSEO album image URL like this one:

Code:
http://www.leicaplace.com/members/brian/albums/1934-5cm-f2-sonnar-converted-ltm/61-l1000767.jpg
and rewrite it to the new format, which for this example would be:

Code:
http://www.leicaplace.com/attachment.php?attachmentid=62&d=1365294531

Can anyone help? I'm using vBulletin 4.2.2 in case that matters.
Reply With Quote
  #2  
Old 10-14-2013, 02:25 AM
futureaudio futureaudio is offline
 
Join Date: Mar 2010
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unless I'm mistaken here, you would need a script to resolve the details into actual attachmentid which can be referenced through htaccess in background.
Reply With Quote
  #3  
Old 10-14-2013, 01:00 PM
asabet asabet is offline
 
Join Date: Dec 2008
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't have a clue how to do that but will continue to hunt. Surely I can't be the first to have this problem. Thanks for your reply!

While I'm at it, I have a second, related question that may be easier to answer.

I uninstalled vBSEO on another vBulletin 4.2.2 site and am using the following .htaccess content so that my incoming links are rewritten from vBSEO format to vBulletin (simple) format:

Code:
RewriteRule [^/]+/[^/]+-([0-9]+)/ http://www.talknex.com/showthread.php?t=$1 [L,R=301]
RewriteRule ^f([0-9]+)/$ http://www.talknex.com/forumdisplay.php?f=$1 [L,R=301]
RewriteRule ^members/(.+)/ http://www.talknex.com/member.php?username=$1 [L,R=301]
Now I want to move that forum to a new domain, from talknex.com to emountnation.com.

What do I put in the .htaccess file on the old domain to 301 redirect everything to the new domain and at the same time rewrite any old incoming vBSEO links to the old domain? Would this work?

Code:
RewriteRule [^/]+/[^/]+-([0-9]+)/ http://www.emountnation.com/showthread.php?t=$1 [L,R=301]
RewriteRule ^f([0-9]+)/$ http://www.emountnation.com/forumdisplay.php?f=$1 [L,R=301]
RewriteRule ^members/(.+)/ http://www.emountnation.com/member.php?username=$1 [L,R=301]
RewriteCond %{HTTP_HOST} !^emountnation\.com$
RewriteRule ^(.*)$ http://emountnation.com/$1 [L,R=301]
RewriteRule ^forum/(.*)$ /$1 [L,R=301]
Reply With Quote
  #4  
Old 10-14-2013, 10:37 PM
futureaudio futureaudio is offline
 
Join Date: Mar 2010
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is going to be a bit of mess. Is there a particular reason you are switching these many variables at the same time? Personally, I would just redirect all url's from old to new domain and handle all the conversions at the new domain.

That being said, I'm not sure if you're aware that you can still use VBSEO format url without actally using VBSEO itself?

You should really plan this carefully before you make all of these changes.

For redirecting from old domain to new domain:


Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^talknex\.com$ [NC]
RewriteRule ^(.*)$ http://www.emountnation.com [R=301,L]
Reply With Quote
Благодарность от:
tbworld
  #5  
Old 10-15-2013, 10:38 AM
asabet asabet is offline
 
Join Date: Dec 2008
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think I can just forward from the old domain to the new domain. Google seems to have reindexed me since getting rid of vBSEO, and so the other rewrites aren't needed anymore. Thanks again for your help.
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 08:08 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.04185 seconds
  • Memory Usage 2,203KB
  • 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
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (1)post_thanks_box_bit
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete