Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Page 1 of 2 12 LastLast
Results 1 to 10 of 28

Thread: CMS in root, forum at /forum

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default CMS in root, forum at /forum

    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

  2. #2
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    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:
    Code:
    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

  3. #3
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default

    Many thanks. I'll try that and will let you know how it went.

  4. #4
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default

    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?
    Last edited by norku; 07-03-11 at 16:25.

  5. #5
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    can you try this .htaccess file?

    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]
    
    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]

  6. #6
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default

    Before I go ahead and try that here's my current htaccess (obviously without the vbet rules):

    PHP Code:
    edited out awaiting response 
    Last edited by norku; 07-03-11 at 22:38.

  7. #7
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default

    Any news? Did you get the PM I sent a few hours ago by the way?

  8. #8
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    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?

  9. #9
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default

    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.

  10. #10
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default

    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 ?

    PHP Code:
    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/$[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
    Last edited by norku; 08-03-11 at 18:05.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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