Results 1 to 3 of 3

Redirect Question, possibly custom rule

This is a discussion on Redirect Question, possibly custom rule within the General Discussion forums, part of the vBulletin SEO Discussion category; Hi there, first day testing vBSEO i used the following thread rewrite rules: boardunity.de/[thread_id]-[thread_title].html second day i used the following ...

  1. #1
    Senior Member Jannefant's Avatar
    Real Name
    Jan Stöver
    Join Date
    Aug 2005
    Location
    Germany / Lübeck
    Posts
    101
    Liked
    0 times

    Question Redirect Question, possibly custom rule

    Hi there,

    first day testing vBSEO i used the following thread rewrite rules:

    boardunity.de/[thread_id]-[thread_title].html

    second day i used the following thread rewrite rules:

    boardunity.de/[thread_title]-t[thread_id].html

    t[thread], f[forum], u[poll], ... to seperate the forumurlstructure from a upcoming blogurlstructure in the same directory

    On the first day i get some nice rankings ... (take a look)

    I want to redirect request for: boardunity.de/[thread_id]-[thread_title].html
    to: boardunity.de/[thread_title]-t[thread_id].html

    http://boardunity.de/3535-angepasste...der-vbseo.html should redirect to
    http://boardunity.de/angepasste-disk...seo-t3535.html

    The RewriteRule must be one of the following:
    RewriteRule ^([0-9]+)-([a-zA-Z0-9-]+)\.html$ $2-t$1.html [R=301]
    RewriteRule ^([0-9]+)-([a-zA-Z0-9-]+).html$ $2-t$1.html [R=301]

    That 301rule cant be written directly into the custom rules so i put it into the .htaccess this way:
    Code:
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    
    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums)
    # RewriteBase /
    
    RewriteCond %{REQUEST_FILENAME} !admincp/
    RewriteCond %{REQUEST_FILENAME} !modcp/
    RewriteRule ^(.*\.php) vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([0-9]+)-([a-zA-Z0-9-]+)\.html$ $2-t$1.html [R=301]
    RewriteRule ^(.+)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    Any ideas how i can manage this? Thanks in advance!

  2. #2
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    168 times
    Hi Jannefant,
    just try to move the selected rule (in bold) to the top (right after commented "RewriteBase" directive) and it should work as expected, I believe.

  3. #3
    Senior Member
    Real Name
    Joseph Ward
    Join Date
    Jun 2005
    Posts
    23,845
    Liked
    36 times
    Blog Entries
    9
    @Jannefant:

    Did the change Oleg suggested correct your issue?

Similar Threads

  1. Syntax for Custom Rewrite Rules
    By Joe Ward in forum Custom Rewrite Rules
    Replies: 33
    Last Post: 02-10-2011, 08:49 PM
  2. Please help with custom rewrite rule.
    By john in forum Custom Rewrite Rules
    Replies: 7
    Last Post: 03-30-2006, 03:19 PM
  3. custom rewrite rule conflict
    By xb_ in forum Bug Reporting
    Replies: 4
    Last Post: 09-11-2005, 05:59 PM

Posting Permissions

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