Results 1 to 6 of 6

My creation is almost complete ...

This is a discussion on My creation is almost complete ... within the General Discussion forums, part of the vBulletin SEO Discussion category; Ok enough with the fanatical references to my website being an offspring. Right, basically i have one tiny little issue ...

  1. #1
    Senior Member Michael's Avatar
    Real Name
    Michael Benson
    Join Date
    Sep 2005
    Location
    United Kingdom
    Posts
    776
    Liked
    0 times

    My creation is almost complete ...

    Ok enough with the fanatical references to my website being an offspring. Right, basically i have one tiny little issue to iron out regarding the revamp of my forums. It is quite critical, but one which i am pretty confident can be resolved easily.

    Throughout my forum signatures i have been advertising a couple of pages on The Staff Lounge as ./vbulletin-resources.html, but because of moving the forum location to their own folders the actual page location was ./forums/vbulletin-resources.html I decided that this was too long for search engines to rank this page as highly as it should - therefore i created the page manually using Wordpress, but unfortunately they format their pages like so, ./vbulletin-resources/

    SO, could someone draw up a simple mod_rewrite which would effectively redirect all users trying to access www.staff-lounge.com/vbulletin-resources.html to www.staff-lounge.com/vbulletin-resources/ ? Obviously because of the generic URL location i would appreciate it if this was just a direct rewrite and not one like so; RewriteRule ^(.+)/(.+)-([0-9]+)\.html$ $1/vbulletin-$2-t$3.html

    Thanks for your help.
    To summarize;

    I would like a rewrite rule which would redirect users trying to access
    Code:
     www.staff-lounge.com/vbulletin-resources.html
    to
    Code:
     www.staff-lounge.com/vbulletin-resources/

  2. #2
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Hello Michael,

    the following rewrite rule should work as described:
    RewriteRule vbulletin-resources\.html vbulletin-resources/ [L,R=301]
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  3. #3
    Senior Member Michael's Avatar
    Real Name
    Michael Benson
    Join Date
    Sep 2005
    Location
    United Kingdom
    Posts
    776
    Liked
    0 times
    Thanks worked like a charm, right i thought i was done. But apparantly, i forgot about one very important aspect, the sitemap. *This .htaccess file is getting seriously complex now!*

    I would basically like the following prefixed with /forums whenever accessed;
    staff-lounge.com/sitemap/t-#.html

    Replacing # with the corresponding topicid.
    I tried the following but it didnt work;
    RewriteRule ^([^/]+/t-[0-9]+\.html)$ forums/$1 [L,R=301]

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Hi,

    this rewrite rule looks ok, make sure that it goes before others (right after "RewriteEngine on").
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  5. #5
    Senior Member Michael's Avatar
    Real Name
    Michael Benson
    Join Date
    Sep 2005
    Location
    United Kingdom
    Posts
    776
    Liked
    0 times
    Sorry to reawaken an old thread but the rewrite rule provided above now no longer seems to correctly function. I havent myself made any changes to the root .htaccess file which deals with the redirect, i can only assume that the vBSEO upgrade has effected it in some way.

    Rather than ./vbulletin-resources.html being redirected to ./vbulletin-resources/, users are being sent to ./home/michael/public_html/vbulletin-resources/

    Here is my root .htaccess file;
    Code:
    RewriteEngine On
    
    RewriteRule vbulletin-resources\.html vbulletin-resources/ [L,R=301]
    RewriteRule ^ipb-resources\.html vbulletin-resources/ipb-resources/ [L,R=301]
    RewriteRule ^phpbb-resources\.html vbulletin-resources/phpbb-resources/ [L,R=301]
    RewriteRule ^forum-resources\.html vbulletin-resources/forum-resources/ [L,R=301]
    RewriteRule ^invisionfree-resources\.html vbulletin-resources/invisionfree-resources/ [L,R=301]
    
    # BEGIN Mint
    AddType application/x-httpd-php .html .htm
    php_value auto_prepend_file /home/michael/public_html/mint/config/auto.php
    # END Mint
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    
    <IfModule mod_rewrite.c>
    RewriteRule ^tags/(.*)$ ?page_id=180&tag=$1
    </IfModule>

  6. #6
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Hello Michael,

    please try to add "RewriteBase /" directive in .htaccess.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


Posting Permissions

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