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
    87
    Liked
    0 times

    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

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

    Code:
    RewriteCond &#37;{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.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  3. #3
    Member
    Real Name
    Tony
    Join Date
    Sep 2006
    Location
    Huntington Beach, CA
    Posts
    87
    Liked
    0 times
    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

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    You should put this .htaccess in "foldername/" (and remove .htacess from the domain root).
    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
    Member
    Real Name
    Tony
    Join Date
    Sep 2006
    Location
    Huntington Beach, CA
    Posts
    87
    Liked
    0 times
    It's not working.

    It gets redirected to forums directory.

  6. #6
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    What is an example URL for that?
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


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

Posting Permissions

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