1. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.
  2. In order to post messages and view attached files in this forum, you must be a licensed XenForo customer.
    If you can't post, enter your forum username in the Associated Forum Users form in your customer area.

Redirects for vBSEO'd URLs

Discussion in 'Add-on Releases [Archive]' started by Shadab, Oct 6, 2010.

  1. I can't get my redirects to work when Use Full Friendly URLs is enabled. What's going on here?
  2. Hoffi Active Member

    You did all steps?
    Save the import table.
    Installed redirections Scripts from Kier and set the Directory and Table in the 301redirect.php
    Created the Rewrite Rules and added them to your .htaccess Files at the beginning?
  3. Yes. It works fine without Friendly URLS enabled, but I would prefer to have it enabled.

    Code:
        RewriteEngine On
        RewriteRule [\d]+-[^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
        RewriteRule [\d]+-[^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]
        RewriteRule ([\d]+)-[^/]+/index([\d]+).html forumdisplay.php?f=$1&page=$2 [NC,L]
        RewriteRule ([\d]+)-[^/]+/ forumdisplay.php?f=$1 [NC,L]
       
    #    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>
        #    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>
    You can see it works here:
    http://www.consolediscussions.com/forum/19-videos/24589-socom-ftb3-hacks.html
  4. ankurs Well-Known Member

    does any one have vbseo rewrite for nginx ?
  5. lph Active Member

    Oops. A hacker got into the old site and domain before I was ready to make the redirects. The db was so large that the post table was destroyed ... anyway ... the redirects need to be done now.

    vb was located /technology
    xf is located /community

    This is the sample of the structure

    old location

    http://www.technologyquestions.com/technology/windows-vista/63396-trustedinstaller-exe.html

    New location

    http://www.technologyquestions.com/community/threads/trustedinstaller-exe.63396/

    Can anyone help?
    What would be put in .htaccess?
  6. Hoffi Active Member

    try
    Code:
    RewriteRule /(.+)/([0-9]+)-(.+).html /community/$3.$2/
    
  7. lph Active Member

    Does that go in the root .htaccess or /technology/.htaccess ? I tried both locations and neither is redirecting.
  8. Hoffi Active Member

    Sorry, overseen the directory for the vB. Tryp this one in the root .htaccess

    Code:
    RewriteRule ^technology/(.+)/([0-9]+)-(.+).html /community/$3.$2/ [R=301,L]
  9. lph Active Member

    Thank you but that doesn't seem to work either :(

    Ugh. Thank you for the help but something isn't right in probably an obvious way and I have to get to work now so this is going to be broken all day. Double ugh.

    Update: This appears to be working.

    Code:
    RewriteRule ^technology/(.+)/([0-9]+)-(.+).html /community/threads/$3.$2/ [R=301,L]
  10. graham_w Active Member

    thanks for this tool - worked great (y)
  11. Hoffi Active Member

    Good to hear that it works.
  12. Archet Member

    This is absolutely fantastic. After loosing almost all my hair over the past couple of days, this script did the trick in 2 minutes.

    Thank you VERY much!

Share This Page