vBulletin 4, the most powerful community software + vBSEO 3.5, the ultimate SEO solution = Your ultimate platform for 2010 and beyond. Click below to learn more.

Results 1 to 6 of 6

VBSEO on the same level as forums directory

This is a discussion on VBSEO on the same level as forums directory within the Troubleshooting forums, part of the vBSEO SEO Plugin category; Hello, I'm going to implement vbseo outside of forums URL. Instead in web root directory, I'm going to implement in ...

  1. #1
    Member
    Real Name
    Tony
    Join Date
    Sep 2006
    Location
    Huntington Beach, CA
    Posts
    86

    VBSEO on the same level as forums directory

    Hello,

    I'm going to implement vbseo outside of forums URL.
    Instead in web root directory, I'm going to implement in a subfolder under web root (same level as forums directory). Is this possible?

    If yes, how can I achieve that?

    Here's the details:
    vBulletin root is on root/forums
    Custom scripts root is on root/scripts


    Here's CRR entries:
    Code:
    '^customscript\.php\?cat1=(\d+)&cat2=(\d+)&cat3=(\d+)$' => 'showcat/$1/$2/$3/'
    '^customscript\.php\?cat1=(\d+)&cat2=(\d+)$' => 'showcat/$1/$2/'
    

    Here's .htaccess (on forums folder):
    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 %{HTTP_HOST} !^www\.makeuptalk\.com
    #RewriteRule (.*) http://www.makeuptalk/forums/$1 [L,R=301]
    
    #RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} (admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.*)$ $1 [L]
    
    RewriteCond %{REQUEST_FILENAME}index\.php -f
    RewriteRule ^(.*)$ $1index.php [L]
    
    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_FILENAME} !chat
    RewriteRule ^(.*\.php)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    
    RewriteRule ^$ vbseo.php?vbseourl=index.php [L]
    RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    

    Here's .htaccess (on web root):
    Code:
    RewriteEngine On
    
    RewriteCond %{REQUEST_FILENAME} !forums/
    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ forums/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
    
    RewriteCond %{REQUEST_FILENAME} !forums/
    RewriteRule ^(.*.php)$ forums/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
    

    In customscript.php:
    These two are in the same files, it's just used to show 2-levels or 3-levels categories.

    Code:
    $seourl = vbseo_any_url("customscript.php?cat1=$cat1&cat2=$cat2"); //For two levels categories
    $seo_title = vbseo_filter_text($catname);
    <a href=\"$seourl$seo_title.html\">$catname</a> // This will produce this link: http://www.mydomain.com/scripts/showcat/1/2/category-name.html
    

    Code:
    $seourl = vbseo_any_url("customscript.php?cat1=$cat1&cat2=$cat2&cat3=$cat3"); //For three levels categories
    $seo_title = vbseo_filter_text($catname);
    <a href=\"$seourl$seo_title.html\">$catname</a> // This will produce this link: http://www.mydomain.com/scripts/showcat/1/2/3/category-name.html
    
    There are no 404, 500 errors.
    The page get redirected but it's not correct.

    Accessing directly from this url works correctly:
    Code:
    http://www.mydomain.com/forums/vbseo.php?vbseourl=scripts/customscript.php&vbseorelpath=../&cat1=1&cat2=2
    

    Thanks
    MakeupTalk.com 1.6 million posts - 3MultiMedia.com

  2. #2
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,527
    In case if you want to rewrite another subfolder "foldername/" (not domain root), .htaccess should be:

    Code:
    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ ../forums/vbseo.php?vbseourl=$1&vbseorelpath=../foldername/&%{QUERY_STRING} [L]
    
    RewriteRule ^(.*\.php)$ ../forums/vbseo.php?vbseourl=$1&vbseorelpath=../foldername/&%{QUERY_STRING} [L]
    
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  3. #3
    Member
    Real Name
    Tony
    Join Date
    Sep 2006
    Location
    Huntington Beach, CA
    Posts
    86
    Hi Oleg,

    I've tried your .htaccess but got Error 400 when applied to web root .htaccess.

    And ot Error 404 when applied to "foldername/".

    Where should I put the .htaccess?
    And should I remove others .htaccess?

    That means for each subfolder we want to use vbseo on, we have to create each RewriteRule for each subfolder?

    Is there a global RewriteRule for it? So we don't have to create that many .htaccess

    Thanks
    MakeupTalk.com 1.6 million posts - 3MultiMedia.com

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,527
    You should put this .htaccess in "foldername/" (and remove .htacess from the domain root).
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


  5. #5
    Member
    Real Name
    Tony
    Join Date
    Sep 2006
    Location
    Huntington Beach, CA
    Posts
    86
    It's not working.

    It gets redirected to forums directory.
    MakeupTalk.com 1.6 million posts - 3MultiMedia.com

  6. #6
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    24,527
    What is an example URL for that?
    Oleg Ignatiuk / Crawlability Inc.
    Sneek Preview Video of the new Control Panel

    vBSEO 3.5 RC2 (Final)- Released for your Evaluation


Similar Threads

  1. vBSEO 2.0 RC7 Released
    By Juan Muriente in forum vBSEO Announcements
    Replies: 17
    Last Post: 09-09-2005, 12:00 AM