vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Please help with album photo URL rewrites after uninstalling vBSEO (https://vborg.vbsupport.ru/showthread.php?t=303363)

asabet 10-13-2013 10:03 PM

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.

futureaudio 10-14-2013 02:25 AM

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.

asabet 10-14-2013 01:00 PM

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]


futureaudio 10-14-2013 10:37 PM

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]


asabet 10-15-2013 10:38 AM

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.


All times are GMT. The time now is 09:57 PM.

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.01008 seconds
  • Memory Usage 1,721KB
  • 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
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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