Closed Thread
Page 1 of 7 1 2 3 ... LastLast
Results 1 to 15 of 99

Thread: External incoming links

  1. #1
    Senior Member sinucello is on a distinguished road sinucello's Avatar
    Join Date
    Mar 2006
    Location
    On the dutch/german border
    Age
    36
    Posts
    112
    Hi,

    after switching a big forum that already existed several years to vbulletin, there will be a lot of external direct-links (Google!) formerly pointing to threads or postings of your forum that won`t work anymore. Therefore it would be great if some kind of translation table could be created during the import. This could be the basis of some Apache-rewrite rules that create redirect permanent lines out of this table.

    I need such a feature and in the open source world, I would now start a call for sponsoring and ask who else is interested and would throw a few bucks in the bucket. But this is a commercial system and I have no clue how it is handled here.

    Ciao,
    Sacha

  2. #2
    ImpEx Developer Jerry will become famous soon enough Jerry's Avatar
    Join Date
    Dec 2002
    Location
    Secret underground lab
    Posts
    9,152
    Blog Entries
    5

    Thumbs up

    I've thought of two main ways of doing this.

    a) Apache, probably with mod_rewrite and using the existing import id's in the database to find the new post/thread URL.

    b) A 404 page. From the old URL you can get the $_SERVER['REQUEST_URI'] or $_SERVER['REDIRECT_QUERY_STRING'] from there you can get the 404 page to give a "Wait looking up the new page, I'm going to redirect you" message.

    An example would be (a link to a phpBB thread) :

    http://www.example.com/phpBB/viewtopic.php?t=372469

    The 404 page looks up the thread where the importthreadid is 372469 and directs you there, personally I would add some logging as well.

    Though this would have to be done on a per system basics as the URL and file names are all different, i.e. phpBB uses viewtopic.php we use showthread.php other systems use different names and GET data.

  3. #3
    ImpEx Developer Jerry will become famous soon enough Jerry's Avatar
    Join Date
    Dec 2002
    Location
    Secret underground lab
    Posts
    9,152
    Blog Entries
    5
    Thinking about it, I'm going to do this, if you want to help test it PM me.

  4. #4
    Jerry, I am also very interested in such a creation. Facing the same problem with 7 years worth of incoming links that are going to instantly become useless without some sort of rewrite help.

    Thanks

    TimS

  5. #5
    ImpEx Developer Jerry will become famous soon enough Jerry's Avatar
    Join Date
    Dec 2002
    Location
    Secret underground lab
    Posts
    9,152
    Blog Entries
    5
    Quote Originally Posted by TimS
    Jerry, I am also very interested in such a creation. Facing the same problem with 7 years worth of incoming links that are going to instantly become useless without some sort of rewrite help.

    Thanks

    TimS
    A ubb.classic custom 404 could be interesting I'm not 100% familiar with the URL make up for forum/thread/post/user selection, so what I've thought about is...

    Working on the basics of a custom 404 redirect look up where you can add your own "My old URL's look like this and mean this" config, so it can be used for any system, so I don't have to write specific sections for 76 importers

  6. #6
    Jerry, the potential problems would be many - not trying to discourage you, but the biggest hurdle would be something I'm facing right now.

    For 4 years I've been running UBB with "spider friendly" URLs with "fake .html extentions" enabled. It's worked wonders for search engines, we are very well indexed. Except the friendly URLs require that ultimatebb.cgi is present and accessible. And the problem with that is, I would like to use a redirect to send any hits to my forum main page (ultimatebb.cgi) to the new vBulletin forum main page.

    And that would no longer allow the spider friendly URLs to work because they don't represent actual html pages.

    Your problem, if you attempt this script, is that there are a number different URL options in UBB - normal, spider friendly using paths, short spider friendly and spider friendly compatibility mode - and then an option to add "fake" .html extensions.

    I'm confused already...good thing I'm not working on this rewrite script, huh?

    TimS

  7. #7
    ImpEx Developer Jerry will become famous soon enough Jerry's Avatar
    Join Date
    Dec 2002
    Location
    Secret underground lab
    Posts
    9,152
    Blog Entries
    5
    This script is going to help redirect users that are using external links and internal link parsing, not to help with search engines.

  8. #8
    ImpEx Developer Jerry will become famous soon enough Jerry's Avatar
    Join Date
    Dec 2002
    Location
    Secret underground lab
    Posts
    9,152
    Blog Entries
    5
    Well I've done it and its in tools/404.php, it will work in place of internal link parsing as well, though you'll have to know how to set up a 404.php page as well as a 2nd 404 page for links that aren't from the old forum.

  9. #9
    Member denby is on a distinguished road
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    44

    Thumbs up

    Très élégant!

    At this stage it's only for forums migrated from phpBB2 but hey, I'm happy!

    For those who'd like to know, here's how to setup the 404.php and fallback 404.htm page.
    1. Download Impex from the member's area and extract the 404.php file from the /tools folder.
    2. Edit the 404.php script to configure it for your forum. Jerry has peppered the top of that script with comments and examples.
    3. Upload 404.php to your forum directory (e.g. http://www.example.com/forum/404.php). chmod it to 644
    4. Add a new table to your vB database called 404_actions using phpMyAdmin (or some other database interface). See the notes at the top of the 404.php script for the SQL. Be sure to prepend your table prefix to the table name (e.g. vb3404_actions). [should the SQL listing in the script be annotated Jerry?]
    5. Create an HTML file called 404.htm containing a nicely formatted message about not finding the file your visitor sought and suggesting they contact you if their problem persists. Upload that file to your webroot (e.g. http://www.example.com/404.htm). chmod it to 644
    6. Create/amend your .htaccess file in your forum directory (e.g. http://www.example.com/forum/.htaccess). You need one ErrorDocument 404 directive that says:
      Code:
      ErrorDocument 404 /forum/404.php
    NOTE: when you configure 404.php (step 2), set the constant $standard_404 to the full URL path of your 404.htm file (e.g. http://www.example.com/404.htm).

    Have I missed anything?

    Jerry, your code is simple and sweet but robust. Your timing is perfect as I'm just about to migrate from phpBB2 to VB. So long as I preserve the import IDs after migration, this will allow my members to use links with the old forum URLs and preserve all external links validity into the bargain.

    Thanks a lot!

    "All the world's a stage .. coach." - John Wayne

  10. #10
    ImpEx Developer Jerry will become famous soon enough Jerry's Avatar
    Join Date
    Dec 2002
    Location
    Secret underground lab
    Posts
    9,152
    Blog Entries
    5
    Quote Originally Posted by denby
    Très élégant!

    At this stage it's only for forums migrated from phpBB2 but hey, I'm happy!


    If there are any other Tier 1 systems that people want this for let me know and I'll add the relevant URL parsing.

    Quote Originally Posted by denby
    For those who'd like to know, here's how to setup the 404.php and fallback 404.htm page.
    Quote Originally Posted by denby
    1. Download Impex from the member's area and extract the 404.php file from the /tools folder.
    2. Edit the 404.php script to configure it for your forum. Jerry has peppered the top of that script with comments and examples.
    3. Upload 404.php to your forum directory (e.g. http://www.example.com/forum/404.php). chmod it to 644
    4. Add a new table to your vB database called 404_actions using phpMyAdmin (or some other database interface). See the notes at the top of the 404.php script for the SQL. Be sure to prepend your table prefix to the table name (e.g. vb3404_actions). [should the SQL listing in the script be annotated Jerry?]
    5. Create an HTML file called 404.htm containing a nicely formatted message about not finding the file your visitor sought and suggesting they contact you if their problem persists. Upload that file to your webroot (e.g. http://www.example.com/404.htm). chmod it to 644
    6. Create/amend your .htaccess file in your forum directory (e.g. http://www.example.com/forum/.htaccess). You need one ErrorDocument 404 directive that says:
      Code:
      ErrorDocument 404 /forum/404.php
    NOTE: when you configure 404.php (step 2), set the constant $standard_404 to the full URL path of your 404.htm file (e.g. http://www.example.com/404.htm).

    Have I missed anything?


    I don't think so, though I'll write a 404.impex.readme.txt now explaining this process.

    Quote Originally Posted by denby
    Jerry, your code is simple and sweet but robust. Your timing is perfect as I'm just about to migrate from phpBB2 to VB. So long as I preserve the import IDs after migration, this will allow my members to use links with the old forum URLs and preserve all external links validity into the bargain.

    Thanks a lot!
    Thanks, welcome to vBulletin

  11. #11
    ImpEx Developer Jerry will become famous soon enough Jerry's Avatar
    Join Date
    Dec 2002
    Location
    Secret underground lab
    Posts
    9,152
    Blog Entries
    5
    Ok, I've added a 404.impex.readme.txt now to explain how to set it up, as well as how to do a multi import redirect and the SQL I'd use for logging.

    I plan on adding all the Tier 1 systems to the URL parsing (as possible).

  12. #12
    Senior Member sinucello is on a distinguished road sinucello's Avatar
    Join Date
    Mar 2006
    Location
    On the dutch/german border
    Age
    36
    Posts
    112
    Hi,

    Jerry, thank you very much for your quick solution. I`ll test it next week.

    Ciao,
    Sacha

  13. #13
    ImpEx Developer Jerry will become famous soon enough Jerry's Avatar
    Join Date
    Dec 2002
    Location
    Secret underground lab
    Posts
    9,152
    Blog Entries
    5
    Quote Originally Posted by TimS
    Jerry, the potential problems would be many - not trying to discourage you, but the biggest hurdle would be something I'm facing right now.

    For 4 years I've been running UBB with "spider friendly" URLs with "fake .html extentions" enabled. It's worked wonders for search engines, we are very well indexed. Except the friendly URLs require that ultimatebb.cgi is present and accessible. And the problem with that is, I would like to use a redirect to send any hits to my forum main page (ultimatebb.cgi) to the new vBulletin forum main page.

    And that would no longer allow the spider friendly URLs to work because they don't represent actual html pages.

    Your problem, if you attempt this script, is that there are a number different URL options in UBB - normal, spider friendly using paths, short spider friendly and spider friendly compatibility mode - and then an option to add "fake" .html extensions.

    I'm confused already...good thing I'm not working on this rewrite script, huh?

    TimS

    I've added 301 redirect now, so search engines will know what's going on.

  14. #14

    Ubbthreads

    Don't know if anyone else has asked but I'm working on a Ubbthreads conversion. This would be sweet to have for it.

    Looking at the script, I think if I just parse viewthreaded.php and viewflat.php I'll probably pick up the vast majority of requests.

    The rest I'll just dump to the main forum page.

    Greg
    Last edited by gfuchs; Wed 17th May '06 at 5:59pm.

  15. #15
    ImpEx Developer Jerry will become famous soon enough Jerry's Avatar
    Join Date
    Dec 2002
    Location
    Secret underground lab
    Posts
    9,152
    Blog Entries
    5
    Quote Originally Posted by gfuchs
    Don't know if anyone else has asked but I'm working on a Ubbthreads conversion. This would be sweet to have for it.

    Looking at the script, I think if I just parse viewthreaded.php and viewflat.php I'll probably pick up the vast majority of requests.

    The rest I'll just dump to the main forum page.

    Greg
    PM me and I'll update the tool with your help for the URLs to parse.

Closed Thread
Page 1 of 7 1 2 3 ... LastLast

Similar Threads

  1. Creating External Links in vB3?
    By Vile in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 8
    Last Post: Mon 10th Nov '03, 2:39pm
  2. External Links as Forums - suggestion
    By bdbourn in forum vBulletin Suggestions and Feedback
    Replies: 0
    Last Post: Thu 3rd Jul '03, 9:43pm
  3. External Forum Links...
    By Wayne Luke in forum vBulletin Suggestions and Feedback
    Replies: 2
    Last Post: Sat 28th Jun '03, 6:21pm
  4. external links target=_blank, internal links target=_top?
    By boatdesignnet in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 3
    Last Post: Thu 3rd Jan '02, 12:06am
  5. Adding external links to forumjump
    By bira in forum vBulletin 2 Suggestions and Feedback
    Replies: 8
    Last Post: Mon 26th Feb '01, 12:30pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts