Results 1 to 8 of 8

vBSEO .htaccess file

This is a discussion on vBSEO .htaccess file within the Troubleshooting forums, part of the vBSEO Google/Yahoo Sitemap category; I'm trying to get my htaccess files sorted when I noticed the one in the folder vbseo -includes says 'deny ...

  1. #1
    Member alexscott's Avatar
    Real Name
    Alex
    Join Date
    Jul 2009
    Posts
    39
    Liked
    0 times

    vBSEO .htaccess file

    I'm trying to get my htaccess files sorted when I noticed the one in the folder vbseo-includes says 'deny from all'
    Is this correct?

  2. #2
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    Yes. These are there to stop DIRECT loading of said files. They can still be 'included' via other scripts.

  3. #3
    Member alexscott's Avatar
    Real Name
    Alex
    Join Date
    Jul 2009
    Posts
    39
    Liked
    0 times
    Thanks for that Brian.

    Can you have a look at this one and tell me if it's OK, should I remove the # for the rewritebase and fill in my forum URL instead of yourdomain?




    # 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\.yourdomain\.com
    #RewriteRule (.*) http://yourdomain/forums/$1 [L,R=301]

    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]


    RewriteCond %{HTTP_REFERER} \.ru [NC,OR]
    RewriteCond %{HTTP_REFERER} \.KR [NC,OR]
    RewriteCond %{HTTP_REFERER} \.cn [NC]
    RewriteRule .* - [F,L]

    RewriteCond %{HTTP_USER_AGENT} ^Sogou [NC]
    RewriteRule .* - [F]

    RewriteCond %{HTTP_USER_AGENT} ^Soso [NC]
    RewriteRule .* - [F]


    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images|photop ost)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]

  4. #4
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    rewritebase, no. if its working now, you don't need that directive enabled.

    the other one, yes, you should enable as per
    [How to] Setup www.yourdomain.com or yourdomain.com (www vs. non-www) - With .htaccess 301 redirects - vBulletin SEO Forums

  5. #5
    Member alexscott's Avatar
    Real Name
    Alex
    Join Date
    Jul 2009
    Posts
    39
    Liked
    0 times
    So should it look like this?


    # 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\.canon-fodder-forums\.com
    RewriteRule (.*) http://www.canon-fodder-forums.com/forums/$1 [L,R=301]


    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]


    RewriteCond %{HTTP_REFERER} \.ru [NC,OR]
    RewriteCond %{HTTP_REFERER} \.KR [NC,OR]
    RewriteCond %{HTTP_REFERER} \.cn [NC]
    RewriteRule .* - [F,L]

    RewriteCond %{HTTP_USER_AGENT} ^Sogou [NC]
    RewriteRule .* - [F]

    RewriteCond %{HTTP_USER_AGENT} ^Soso [NC]
    RewriteRule .* - [F]


    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images|photop ost)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]

  6. #6
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    yup, you may also want to tack on an end of line character on the host, $, ie

    RewriteCond %{HTTP_HOST} !^www\.canon-fodder-forums\.com$

  7. #7
    Member alexscott's Avatar
    Real Name
    Alex
    Join Date
    Jul 2009
    Posts
    39
    Liked
    0 times
    Brian I made the changes but post icons, smilies and the favicon all disappeared and were replaced by text.

    Do I need to remove a part or add something to make it work?

  8. #8
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    Make sure your vboptions -> site url matches the www's or non-www's that you used.

Similar Threads

  1. vBSEO .htaccess file conflicting with other rewrites?
    By TheMags in forum Troubleshooting
    Replies: 7
    Last Post: 02-26-2011, 09:57 AM
  2. vBulletin 4.x Installed vbSEO, htaccess file is corrupt
    By IndianaShooter in forum Troubleshooting
    Replies: 5
    Last Post: 12-11-2010, 01:48 PM
  3. Replies: 17
    Last Post: 08-02-2010, 10:04 AM
  4. .htaccess file already there
    By Tkmstr1009 in forum URL Rewrite Settings
    Replies: 5
    Last Post: 12-22-2008, 11:19 PM
  5. 3.0 RC 5 htaccess file
    By Richard in forum General Discussion
    Replies: 5
    Last Post: 10-09-2006, 07:01 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
  •