PDA

View Full Version : Solved CMS in root, forum at /forum



norku
07-03-11, 10:20
Hi,

I'd like to know what changes are required in your vbet installation instructions for forums which have the steps at the following link implemented (specifically the second set of instructions in that post for vb installations at /forum):

www .vbseo.com/f5/vbseo-3-5-release-candidate-1-here-39776/index10.html#post254125 vBSEO 3.5 Release Candidate 1 is here! - vBulletin SEO Forums

I tried to install vbet yesterday and received a 404 when I reloaded my forum and I'm guessing that this happened because I implemented the changes at the link.

Thanks

kamilkurczak
07-03-11, 11:30
hello.
If you have your forum in forum folder you should edit a vBET main settings:

admincp->vBET->Main
-Forum directory to /forum
-Link Type to VBSEO_URI
-Translation links type to SEO

secondly you need to make a htaccess file like this one:

RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/ [L,QSA]
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/$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]

if still not good - please paste here your htaccess file content and enable VBET on your site - I will check it.

Thanks

norku
07-03-11, 11:45
Many thanks. I'll try that and will let you know how it went.

norku
07-03-11, 15:03
Didn't work unfortunately. I can't leave vbet active because of the 404. This is the content of the thread I referenced:

/forums (or another folder name) vb4 install

Puts the CMS in root, outside of your forums folder, with no /content/ redirect and your forums remain in their subfolder as always.

Step 1
Copy forums/index.php to your root directory.

Make sure index.php is set to require Content.
Code:

require('content.php');

and that the forum require code bit is commented out.

You will also need to uncomment the Relative Path directive and make sure it reflects accurately to your forum install location:

Code:

define(VB_RELATIVE_PATH, 'forums/');



Do one of the following:
Step 2a:
rename forums/index.php to forums/index_old.php or some other name to keep it around, but not named index.

rename forums/forum.php to forums/index.php

OR:
Step 2b:
edit forums/index.php
Set it to:
Code:

//define(VB_RELATIVE_PATH, '');
require('forum.php');

Step 3:
In vBoptions => forumhome Page options
set the first entry to
Code:

index

And in vboptions -> CMS options,
Make sure the 'site tab URL' script is
Code:

content.php



Also,
CMS URL
"Optional URL for your CMS."
In the vboptions -> CMS options panel should be left BLANK!.


Step 4:

in vbseocp
URL Reweite Settings -> CMS => Advanced Settings tab
set CMS Home


to your FULL .com root with trailing slash, aka
Code:

http://www.yourdomain.com/

DO NOT screw up your www's here. Use them or don't use them as your htaccess and vboptions for BBURL are EXACTLY set up, or you'll end up in a loop.


Step 5:

In vbseocp, Seo Functions -> Homepage settings

set Force forum root as homepage to Yes
and enter
Code:

forums/index.php
forums/index.php?

in the aliases box.

Save settings.


Step 6:

create an htaccess file in your site root with the following. Note, the forums/ path in some of the rules. You may need to adjust to your folder name.

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

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

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

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

Step 7:
Only Required in RC2 pre-release and lower. (will be fixed in next build as of this writing).

Open vbseo/includes/functions_vbseo_vb.php file:
find:
Code:

$headinclude = preg_replace('#<base href.*?>#is', '', $headinclude);

Replace with:
Code:

if(defined('VBSEO_PREPROCESSED'))
$headinclude = preg_replace('#<base href[^>]*?>(\s*?<!--\[if IE\]><\/base><!\[endif\]-->)?#is', '', $headinclude);

Done.




So, on my forum the following is the case:

/index.php resolves to: /
/forum/forum.php resolves to /forum/
/forum/index.php resolves to /forum/

Anything I need to do in addition to the steps shown in the vbet installation guide?

kamilkurczak
07-03-11, 18:28
can you try this .htaccess 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 /

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

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

RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/ [L,QSA]
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/$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]

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

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

norku
07-03-11, 18:50
Before I go ahead and try that here's my current htaccess (obviously without the vbet rules):


edited out - awaiting response

norku
07-03-11, 20:56
Any news? Did you get the PM I sent a few hours ago by the way?

kamilkurczak
07-03-11, 22:49
Yes, I am still thinking about solution.
Can we make a test? what will happen when you set in admincp->main
- Link Type to REQUEST_URI
- Translation links type to Add language parameter to URL (i.e. 'address?language=en')
works or not?

norku
07-03-11, 23:01
Same result. With the updated htaccess in place I get a 404 when I load the forum. If I take your lines out all is fine.

norku
08-03-11, 16:39
As I was saying, my vb suite is installed in /forum. If I use your suggested htaccess then vbenterprisetranslator_seo.php will produce a 404 because it is not located at /vbenterprisetranslator_seo.php but rather at /forum/vbenterprisetranslator_seo.php Sound correct?

With that in mind would the following be correct for a vb suite installed at /forum ?


RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/ [L,QSA]
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/(.*)?$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/$2 [L,QSA]

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


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

I enabled vbet for a minute and tried my htaccess with the addition of the above lines and the 404 has disappeared and the forum loads in the selected language okay. Vbseo urls are appended with /?language=de

So, I'm on the right track here I think. Is the htaccess actually correct in all details though?

Edit: it seemed to be working but when I set VBSEO_URI in the Vbet Main menu it all goes tits up. Obvious why but then again I've been testing this for so many hours now that I'm not sure what's right and what's wrong any more....




So,

Could I have vbet htaccess rules for a forum with the suite installed in /forum please? The rules must take account of the changes made by post 4 above. I want to get this working....

Thanks

kamilkurczak
08-03-11, 19:41
please send to me by PM your FTP and admincp details (and vbseoadmin ) and I will check your server and vBET configuration.

norku
09-03-11, 13:42
This thread disappeared a couple of hours ago when your site went down. Now that the thread is again visible I see that my last reply is missing.

I have in any case requested a refund. The support time and support level is frankly abysmal and I don't have the time to wait for any more half-answers which have not helped in the slightest.

You're not answering questions or reacting to what I'm giving in terms of symptoms/further information. Instead I'm supposed to just give you admin-level access to my forum? For me that's a risk I'm not willing to take. Therefore, if you are unwilling to take the time and discuss things here then I don't see a solution.

vBET
09-03-11, 15:46
This thread disappeared a couple of hours ago when your site went down. Now that the thread is again visible I see that my last reply is missing.

Please see here: http://www.vbenterprisetranslator.com/forum/vbet-announcements/1518-accidental-backup-restore.html
We had accidental backup restore. Our hosting provider instead of getting us back our email client restored whole system from 7th March - they said that then our email client was uninstalled (that is why your thread disappeared first). When we found out what they did we asked to immediately recover system from newest possible backup. That is why your thread come back again (and not only yours) but messages written yesterday/today could be gone (so messages written after backup was made). And this is why your last post is gone.

I understand why you could get wrong impression that you was not supported, but it was just mistake on our hosting provider side and your thread is here. We are ready to continue support as fast as your payment will go back to us. At this moment your Paypal payment is hold so we have to hold any actions related to your license. As fast as pyment will go back Kamil will start supporting you again. Our supprot is free for our customers and our users. At this omment you are not our customer (payment hold) and you cannot be user of paid version without license.

Also please note that your issues are because of modifications which you made yourself - it is not as you wrote to Paypal a bug in our installation instructions. Our installation instructions are for vBulletin structure. You do not have it, because you made your own modification so it is obvious that you have to modify also installation instructions to fit to your changes.

You can count on our free support by this forum or if you think it is bigger issue (because of your changes) and you are not able to do it yourself - then you can also use our paid installation service: http://www.vbenterprisetranslator.com/installation-service.php - please note that even in this case it can take much longer that normal installation because you need special changes because of modifications which you made. Most probably it will be on .htaccess rules level, but it can also require other forum folder configuration, or little modification in our SEO file - cannot tell just like that - Kamil is the one who takes care your case.

norku
09-03-11, 16:07
I have retracted the Paypal dispute. Waiting 3 days and then seeing my thread disappear was very annoying but it sounds like I jumped the gun. My apologies

I have a 'vbulletin structure'. The difference to the 'out of the box' vbulletin installation is described in full in one of my earlier posts and was indeed the reason I started this thread.

kamilkurczak
09-03-11, 18:05
ok I noticed that vBSEO have a different rules, so please try this .htaccess (with vBET changed rules)


# 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://www.yourdomain.com/forums/$1 [L,R=301]

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

RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/$ forums/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/ [L,QSA]
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/(.*)?$ forums/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/$2 [L,QSA]

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


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

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

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

norku
09-03-11, 18:24
Trying it now. Thanks.

norku
09-03-11, 18:27
Okay. No 404 but the page is blank when I click on a flag (any flag). Do you need to know any of my vbet settings?

kamilkurczak
09-03-11, 18:40
ok you must to configure your server, please check this post:
http://www.vbenterprisetranslator.com/forum/vbet4-troubleshooting/413-faq.html#post1535

so install CURL and ICONV in your php

norku
09-03-11, 19:01
cURL and iconv support are already enabled. I'm getting a 404 now when clicking on a flag.




iconv
iconv support enabled
iconv implementation glibc
iconv library version 2.5

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1



curl
cURL support enabled
cURL Information libcurl/7.21.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5



Here's my htaccess:
# 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\.xxxx\.com
RewriteCond %{HTTP_HOST} !(^www\.xxxx\.com$|^cdn\.xxxx\.com$)
RewriteRule (.*) http://www.xxxx/$1 [R=301,L]

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

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

#vbet translator rules start
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/ [L,QSA]
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/(.*)?$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/$2 [L,QSA]

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


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


#vbet translator rules end


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

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

## Expires
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 3456000 seconds"
ExpiresByType image/jpeg "access plus 3456000 seconds"
ExpiresByType image/png "access plus 3456000 seconds"
ExpiresByType text/css "access plus 3456000 seconds"
ExpiresByType text/javascript "access plus 3456000 seconds"
ExpiresByType application/javascript "access plus 3456000 seconds"
ExpiresByType application/x-javascript "access plus 3456000 seconds"
</ifModule>

## Compression
<ifmodule mod_headers.c>
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</ifmodule>
</ifmodule>

#Remove index.php from xxxx/index.php
#rewrite engine on
RewriteCond %{THE_REQUEST} index\.php
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^index\.php$ / [L,R=301]

kamilkurczak
09-03-11, 19:11
why you have a vBET disabled?
also write here your admincp->vBET->main settings

norku
09-03-11, 19:23
I only activate it when I'm actually testing otherwise my members may start clicking on the flags and getting blank screens.

vbet settings:

Forum language: english

Forum directory: /forum

Forum main domain: not set

Link Type: VBSEO_URI

Configure which type of translation links you want: Create URL's according to SEO link consensus (i.e. '/en/address')

kamilkurczak
09-03-11, 19:26
I only activate it when I'm actually testing otherwise my members may start clicking on the flags and getting blank screens.


so you have blank page still or 404?
if blank page - CURL and ICONV , if installed - please try to find in error log file some php errors

norku
09-03-11, 19:38
Here's something:

If I enter
http://www.xxxx.com/de/ I get my forum main page in German. That url should open my CMS

kamilkurczak
09-03-11, 19:40
i can see.. so the issue is in .htaccess. I will analize it.

try this one:


# 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\.hj-research\.com
RewriteCond %{HTTP_HOST} !(^www.hj-research.com$|^cdn.hj-research.com$)
RewriteRule (.*) http://www.hj-research.com/$1 [R=301,L]

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

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

#vbet translator rules start
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/ [L,QSA]
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/(.*)?$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

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


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


#vbet translator rules end


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

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

## Expires
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 3456000 seconds"
ExpiresByType image/jpeg "access plus 3456000 seconds"
ExpiresByType image/png "access plus 3456000 seconds"
ExpiresByType text/css "access plus 3456000 seconds"
ExpiresByType text/javascript "access plus 3456000 seconds"
ExpiresByType application/javascript "access plus 3456000 seconds"
ExpiresByType application/x-javascript "access plus 3456000 seconds"
</ifModule>

## Compression
<ifmodule mod_headers.c>
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</ifmodule>
</ifmodule>

#Remove index.php from hj-research.com/index.php
#rewrite engine on
RewriteCond %{THE_REQUEST} index.php
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^index.php$ / [L,R=301]

kamilkurczak
09-03-11, 21:03
please check this one:

# 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\.hj-research\.com
RewriteCond %{HTTP_HOST} !(^www.hj-research.com$|^cdn.hj-research.com$)
RewriteRule (.*) http://www.hj-research.com/$1 [R=301,L]

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

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

#vbet translator rules start
RewriteRule ^forum/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/ [L,QSA]
RewriteRule ^forum/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/(.*)?$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forum/$2 [L,QSA]

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


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


#vbet translator rules end


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

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

## Expires
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 3456000 seconds"
ExpiresByType image/jpeg "access plus 3456000 seconds"
ExpiresByType image/png "access plus 3456000 seconds"
ExpiresByType text/css "access plus 3456000 seconds"
ExpiresByType text/javascript "access plus 3456000 seconds"
ExpiresByType application/javascript "access plus 3456000 seconds"
ExpiresByType application/x-javascript "access plus 3456000 seconds"
</ifModule>

## Compression
<ifmodule mod_headers.c>
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</ifmodule>
</ifmodule>

#Remove index.php from hj-research.com/index.php
#rewrite engine on
RewriteCond %{THE_REQUEST} index.php
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^index.php$ / [L,R=301]

if still not work - replace this line to this form:

RewriteRule ^forum/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/ [L,QSA]
RewriteRule ^forum/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/(.*)?$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

kamilkurczak
09-03-11, 22:26
there you have a good htaccess to translate main page:


# 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\.hj-research\.com
RewriteCond %{HTTP_HOST} !(^www\.hj-research\.com$|^cdn\.hj-research\.com$)
RewriteRule (.*) http://www.hj-research.com/$1 [R=301,L]

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

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

#vbet translator rules start
#vbet outside site
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)/$ index.php?language=$1&vbet_outside=true [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)/(.*)?$ $2?language=$1&vbet_outside=true [L,QSA]

RewriteCond %{QUERY_STRING} !vbet_outside=true
RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]

RewriteRule ^forum/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/ [L,QSA]
RewriteRule ^forum/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|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|ur|vi|cy|yi)/(.*)?$ forum/vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

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

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

#vbet translator rules end


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

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

## Expires
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 3456000 seconds"
ExpiresByType image/jpeg "access plus 3456000 seconds"
ExpiresByType image/png "access plus 3456000 seconds"
ExpiresByType text/css "access plus 3456000 seconds"
ExpiresByType text/javascript "access plus 3456000 seconds"
ExpiresByType application/javascript "access plus 3456000 seconds"
ExpiresByType application/x-javascript "access plus 3456000 seconds"
</ifModule>

## Compression
<ifmodule mod_headers.c>
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</ifmodule>
</ifmodule>

#Remove index.php from hj-research.com/index.php
#rewrite engine on
RewriteCond %{THE_REQUEST} index\.php
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^index\.php$ / [L,R=301]

norku
09-03-11, 23:03
Many thanks for the work you put into getting this working for me. Much appreciated. I have one thing which isn't working optimally though but I'll open a new thread for that.

Thanks again :)

kamilkurczak
10-03-11, 10:05
ok so if vBET works - solved. Now we need to solve a issue with bad links:)

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
vBET 4.10.1 gives automatic translations