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?
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 ...
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?
Yes. These are there to stop DIRECT loading of said files. They can still be 'included' via other scripts.
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
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]
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
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
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]
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$
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
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?
Make sure your vboptions -> site url matches the www's or non-www's that you used.
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!