PDA

View Full Version : Solved Is this correct htaccess?



beaconsfield
09-10-10, 09:51
All my sitemaps fails at google webmaster center. I want to be sure am I use correct .htaccess? I integtared vbet with vbseo and vbseo sitemap generator in the mean time.


# 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 /

RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected= [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

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

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

#This rule must be in each directory which have to be supported (without forum directory itself)
#RewriteCond %{QUERY_STRING} !vbet_outside=true
#RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]

#RewriteCond %{HTTP_HOST} !^www\.mydomain\.com
#RewriteRule (.*) http://www.mydomain.com/$1 [L,R=301]

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

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)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]

vBET
09-10-10, 16:09
It is wrong. As it is clearly described vBET rules should be placed JUST BEFORE rules to vbseo.php file. In your case those are not. Sitemap rule should be before vBET rules.

beaconsfield
09-10-10, 16:14
Could you please arrange it for me?

beaconsfield
09-10-10, 17:03
Is it ok now?


# 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 /

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

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

RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected= [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

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

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

#This rule must be in each directory which have to be supported (without forum directory itself)
#RewriteCond %{QUERY_STRING} !vbet_outside=true
#RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]

#RewriteCond %{HTTP_HOST} !^www\.mydomain\.com
#RewriteRule (.*) http://www.mydomain.com/$1 [L,R=301]

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

beaconsfield
09-10-10, 17:49
any help will be much appriciated.

vBET
09-10-10, 18:10
Not at all. One more time - vBET rules must be JUST BEFORE rule to vbseo.php. And you have vBET rules AFTER vbseo.php rule... If you have any suggestion how we can describe better that vBET rules have to be JUST BEFORE rules to vbseo.php file - please tell us how to do this. JUST BEFORE rules to vbseo.php means that rules to vbseo.php are BELOW rules to vBET. It also means that there is no any rule between rules to vBET and to vbseo.php

This is how it should look your file:


# 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 /

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

RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected= [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

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

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

#This rule must be in each directory which have to be supported (without forum directory itself)
#RewriteCond %{QUERY_STRING} !vbet_outside=true
#RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]

#RewriteCond %{HTTP_HOST} !^www\.diyetcenter\.com
#RewriteRule (.*) http://www.diyetcenter.com/$1 [L,R=301]

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)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]


Please tell does it's working now :)

beaconsfield
09-10-10, 19:00
If I had understood your explanation I could have done it. Thanks your help.

It works now. :D

vBET
10-10-10, 21:46
Great - enjoy vBET :D

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations by vBET translator 4.10.1