1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Links Error Page when Convert vbulletin to xenforo.

Discussion in 'Installation, Upgrade, and Import Support' started by nguyenhuuhung, Jul 28, 2013.

  1. nguyenhuuhung

    nguyenhuuhung Active Member

    I have several questions related to the transition from vbb to XenForo

    I need your help


    When I use vbulletin.

    old Links Page:

    http://domain.com/showthread.php?id../page2

    Now.

    New Links Page when I use xenforo.

    http://domain.com/threads/....id/page-2

    They differ at "
    - "

    So. Links are dead when I share


    CLick : http://domain.com/showthread.php?id../page2

    Error will occur " The requested page could not be found. "

    Now I have to do to when clicked Link

    http://domain.com/showthread.php?id../page2

    Will automatically switch to

    http://domain.com/threads/....id/page-2
     
  2. nguyenhuuhung

    nguyenhuuhung Active Member

    Can you rewrite Links page help me???
     
  3. MattW

    MattW Well-Known Member

  4. nguyenhuuhung

    nguyenhuuhung Active Member

  5. nguyenhuuhung

    nguyenhuuhung Active Member

    i use redirection scrip
    But,Links comeback home page.
    Why????
     
  6. Mike

    Mike XenForo Developer Staff Member

  7. nguyenhuuhung

    nguyenhuuhung Active Member

    Yes.! Yesterday,i used it.
    But,I only use showthread,showpost,attach,member,..
    And i didn't install addon_vb4Redri.xml.
    It didn't work.It redirect all links to home page??Why??How do i edit 301config.php??
     
    Last edited: Jul 29, 2013
  8. Mike

    Mike XenForo Developer Staff Member

    You will need to post in the add-on's thread. It may not support the pages in that URL structure.
     
  9. nguyenhuuhung

    nguyenhuuhung Active Member

  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Please provide exact old and new URLs for a thread. Then I can provide specific instructions for your redirects.
     
    nguyenhuuhung likes this.
  11. nguyenhuuhung

    nguyenhuuhung Active Member

  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The ids are the same so you don't need the redirect scripts.

    Add this to the top of the .htaccess file in your web root:

    Code:
    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)-.*$
    RewriteRule ^showthread\.php$ /threads/%2/? [R=301,L]
    
     
    nguyenhuuhung likes this.
  13. nguyenhuuhung

    nguyenhuuhung Active Member

    because, when i run vb4 importer.
    I chosed" Retain imported content IDs".I don't understand it.

    But,if i use .htacces


    Error Link Page.

    Old URL : http://domain.com/...../page2
    new URL: http://domain.com/.../page-2.
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  15. nguyenhuuhung

    nguyenhuuhung Active Member

  16. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    (to replace the old code I posted)

    Code:
    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)-.*/page([0-9]+)$
    RewriteRule ^showthread\.php$ /threads/%2/page-%3? [R=301,L]
    RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)-.*$
    RewriteRule ^showthread\.php$ /threads/%2/? [R=301,L]
    
     
    nguyenhuuhung likes this.
  17. nguyenhuuhung

    nguyenhuuhung Active Member

    XenForo - Error
    The requested page could not be found.


    [​IMG]


    My .htaccess


    PHP:
    #    Mod_security can interfere with uploading of content such as attachments. If you
    #    cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #    SecFilterEngine Off
    #    SecFilterScanPOST Off
    #</IfModule>

    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default

    <
    IfModule mod_rewrite.c>
        
    RewriteEngine On

        
    #    If you are having problems with the rewrite rules, remove the "#" from the
        #    line that begins "RewriteBase" below. You will also have to change the path
        #    of the rewrite to reflect the path to your XenForo installation.
        #RewriteBase /xenforo

        #    This line may be needed to enable WebDAV editing with PHP as a CGI.
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

        
    RewriteCond %{REQUEST_FILENAME} -[OR]
        
    RewriteCond %{REQUEST_FILENAME} -[OR]
        
    RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule 
    ^.*$ - [NC,L]
        
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
        
    RewriteRule ^.*$ index.php [NC,L]
            
    RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)-.*/page([0-9]+)$
            
    RewriteRule ^showthread\.php$ /threads/%2/page-%3? [R=301,L]
            
    RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)-.*$
            
    RewriteRule ^showthread\.php$ /threads/%2/? [R=301,L]
    </
    IfModule>
     

    Attached Files:

    Last edited: Jul 30, 2013
  18. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Again, that's a different URL. That's why I ask for specific and real URLs, not just examples of the same form. Here is new code to account for that third kind of URL:

    Code:
    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)(-.*)?/page([0-9]+)$
    RewriteRule ^showthread\.php$ /threads/%2/page-%4? [R=301,L]
    RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)(-.*)?$
    RewriteRule ^showthread\.php$ /threads/%2/? [R=301,L]
    
     
  19. nguyenhuuhung

    nguyenhuuhung Active Member

  20. nguyenhuuhung

    nguyenhuuhung Active Member

    I tried

    URL http://domain.com/showthread.php?15 And http://domain.com/showthread.php?15-i-love-jake redirected success successfully
    But. URL http://domain.com/showthread.php?15/page2 redirected failure

    I think it is an error

    Can You helped me thoroughly checked??

    old URL: http://domain.com/showthread.php?15/page2
    New URl: http://domain.com/threads/.15/page-2

    If this URL is redirected

    URL http://domain.com/showthread.php?15-i-love-jake/page2 will also work

    Because

    URL http://domain.com/showthread.php?15 And http://domain.com/showthread.php?15-i-love-jake.

    They is One.


    XenForo - Error
    The requested page could not be found.
    [​IMG]

    Code:
    #    Mod_security can interfere with uploading of content such as attachments. If you
    #    cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #    SecFilterEngine Off
    #    SecFilterScanPOST Off
    #</IfModule>
    
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
          
            RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)(-.*)?/page([0-9]+)$
            RewriteRule ^showthread\.php$ /threads/%2/page-%4? [R=301,L]
            RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)(-.*)?$
            RewriteRule ^showthread\.php$ /threads/%2/? [R=301,L]
    
        #    If you are having problems with the rewrite rules, remove the "#" from the
        #    line that begins "RewriteBase" below. You will also have to change the path
        #    of the rewrite to reflect the path to your XenForo installation.
        #RewriteBase /xenforo
    
        #    This line may be needed to enable WebDAV editing with PHP as a CGI.
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
    
     

    Attached Files:

    Last edited: Jul 31, 2013

Share This Page