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

XF 1.1 How to set htaccess for links "vb4"

Discussion in 'Troubleshooting and Problems' started by 14DH01, Mar 6, 2013.

  1. 14DH01

    14DH01 Active Member

  2. Slavik

    Slavik XenForo Moderator Staff Member

    14DH01 likes this.
  3. 14DH01

    14DH01 Active Member

    which is?

    I'm a bit lost with it all
     
  4. Digital Doctor

    Digital Doctor Well-Known Member

    Jake Bunce and 14DH01 like this.
  5. rhonal89

    rhonal89 New Member

    Hi there I used the second option here http://tools.geekpoint.net/xfseo/ and it worked for me. But I was using vbseo.

    Here is the redirection script it gives me for .htaccess second option. If that don't work try others.

    RewriteEngine on
    RewriteRule f[\d]+/.+-([\d]+)/index([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
    RewriteRule f[\d]+/.+-([\d]+)/ showthread.php?t=$1 [NC,L]
    RewriteRule f([\d]+)/index([\d]+).html forumdisplay.php?f=$1&page=$2 [NC,L]
    RewriteRule f([\d]+)/ forumdisplay.php?f=$1 [NC,L]
     
    14DH01 likes this.
  6. 14DH01

    14DH01 Active Member

  7. rhonal89

    rhonal89 New Member

  8. 14DH01

    14DH01 Active Member

  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You are using vB4's mod_rewrite URLs. The problem there is that the vB4 and XF URLs both use "/threads/". You need to use this redirect package:

    http://xenforo.com/community/threads/vbulletin-4-x-url-redirection.7584/

    It has an addon you can install for these old mod_rewrite URLs which extends XF's own "/threads/" route to handle those old URLs.
     
  10. 14DH01

    14DH01 Active Member

    thk
    i'm ADD to hack
    Folder => root /mydomain/
    =
    /www/library/Dark/vB4Redir/


    [​IMG]
     
  11. 14DH01

    14DH01 Active Member

    My htaccess:




    My config Forum:
    Use URL rewriting= [Yes]
    If you enable this option, the links generated by the system will not include names such as "index.php?". However, to enable this option, you must have enabled mod_rewrite and have a. Htaccess file appropriate.
     
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    And did you install the XML file for the addon? It's called addon-vB4Redir.xml and it's in the zip file. It must be imported:

    Admin CP -> Home -> Install Add-on
     
    14DH01 likes this.
  13. 14DH01

    14DH01 Active Member

    yes it is in my admin panel.
    For cons, I do not see how to settle it in the administrator panel
    [​IMG]

    I also have a table"archived_import_log":
    [​IMG]
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    14DH01 likes this.
  15. 14DH01

    14DH01 Active Member

    ###########################################################
    Game over:

    . [​IMG]
    I'deleate table "xf_import_log" for remane table "archived to xf_import_log" ?
    Edit:
    I renamed the table "xf import log" to "1_xf_import_log."
    (not to delete the table):rolleyes:.


    [​IMG]



    ###############################################
    Ready:
    I have therefore renamed "archived_import_log" to "xf_import_log."
    [​IMG]



    .Now I need to know the file "php" to check if given the right path (xf_import_log)
     
  16. 14DH01

    14DH01 Active Member

    successful:ROFLMAO:

    the problem was elsewhere! parameters in the administrator, I put in "url" My Site area with the ending "/".
    =
    cibiforum.org//threads/****

    I'm glad, because the pages in "google" is link in the right places.
    Thank you all for your help :love:
     
    Jake Bunce likes this.
  17. sweetpotato

    sweetpotato Active Member

    I have followed exactly the instruction in this thread but redirection still not work yet. The old Vbulletin .htaccess:
    Code:
    RewriteEngine on
     
    # If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
    # RewriteBase /forum/
     
    # If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
    # Options -MultiViews
     
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
     
    RewriteRule ^.*$ - [NC,L]
     
    # Forum
    RewriteRule ^threads/.* showthread.php [QSA]
    RewriteRule ^forums/.* forumdisplay.php [QSA]
    RewriteRule ^members/.* member.php [QSA]
    RewriteRule ^blogs/.* blog.php [QSA]
    RewriteRule ^entries/.* entry.php [QSA]
     
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
     
    RewriteRule ^.*$ - [NC,L]
     
    # MVC
    RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
     
    # Check MVC result
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^(.*)$ - [NC,L]
    RewriteRule ^(.*)$ - [R=404,L]
     
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    Anh here is xenforo .htaccess
    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
     
        #    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 /home6/username/public_html/forum
     
        #    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]
        RewriteCond %{HTTP_HOST} ^www\.([^.]+)\.([^.]+)$
    RewriteRule ^(.*)$ http://%1.%2/$1 [R=301,L]
    RewriteRule ^/old-dir/threads/ /new-dir/forum/threads
    RewriteRule ^/old-dir/forums/ /new-dir/forum/forums
    </IfModule>
    My forum path change also from domain.com/ to domain.com/forum
    How to write the right .htaccess?
     
    14DH01 likes this.
  18. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Please provide an example before and after thread URL.
     
  19. sweetpotato

    sweetpotato Active Member

    Hi Jake,
    The redirection works like a charm when I install Xenforo in root directory like my old vBulletin. But when I convert to Xenforo I integrate Xenforo with Wordpress. I install by the method of Giving WordPress Its Own Directory (detail here http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory).
    Both vBulletin and Xenforo use Mod_Rewrite
    So now I have wordpress in the Wordpress Directory, Xenforo in the Community Directory and in the root directory I have Wordpress .htaccess and index.php files. My new xenforo link now is www.domain.com/coummunity but the old vBulletin link is www.domain.com.
    I think the redirection will work if I can redirect www.domain.com/threads...to www.domain.com/community/threads....
    But if I redirect www.domain.com to www.domain.com/community without any condition the Wordpress will not work.
    Is there any solution to solve this?
    Thank you,
     
  20. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I think I replied to your ticket?
     

Share This Page