No announcement yet.

Changing base URL

  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing base URL

    Developing and testing my vb 5 Connect site on an ISP using a dormant domain that I own. My initial install is at:

    This kept my root public-html folder clean.

    I am ready to deploy, and thought I could point my users to the site by setting a CNAME DNS record to the subfolder where the index.php resides.
    But I found out CNAME records cannot include any directories, just domain names.

    I tried: CNAME

    but this gave an error "invalid domain" in the DNS utility

    Can I move the installation folder up one level? I try an HTTP redirect, but there are some glitches with redirects.
    Is there a way to actually move the installation up to the server root (public-html) without breaking everything?


  • #2
    You can move it up a level. What you would want to do is update the URL in the AdminCP under Settings -> Options -> Site Name / URL / Contact details. There are three options at the top that need to be changed. Then move the files up one directory. You should make sure the parent directory is empty of files (sub-folders are fine) before moving vBulletin's files and directories.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API


    • #3

      Many thanks. I tried to drag/drop the entire "/subfolder/" using my FTP utility (Transmit) but got a file write error for the "core" folder. I don't think this is a vBulletin issue. I am trusting that there is nothing in the"core" folder that would prevent it from being copied or relocated. As per your advice, I will visit the cPanel File Manager, and try again.

      Also, I would like to reference the new baseURL as a variable in code. Specifically, I am writing custom Help pages, and some of my links need to refer to the Home Page, Articles, Blogs, Forums etc. In HTML, is there a token I can use that will be replaced with the baseURL of the site when the Help page is rendered, such as...

      <a href="{vb: baseURL}/forum/myBestForum">MyBestForum</a>



      • #4
        In vBulletin pages, the baseurl is included in the Javascript variable pageData.
        		var pageData = {
        			"baseurl": "",
        			"baseurl_path": "/forum/",
        			"baseurl_login": "",
        			"baseurl_core": "",
        			"pageid": "15",
        			"pagetemplateid": "15",
        			"channelid": "",
        			"nodeid": "0",
        			"userid": "868",
        			"user_startofweek": "1",
        You can reference it through this object.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API


        • #5
          Thanks. The folder migration worked perfectly.
          Now for the baseURL. What is the correct syntax for referencing the javascript variable in an HTML module or the Help files?
          Examples I found in the Templates use the syntax {vb:raw baseurl} but this did not work in an HTML module....
          What is correct? I have tried.....

          {vb:raw baseurl}              
          {vb:raw pageData.baseurl}    
          {vb: $pageData.baseurl}      
          {vb: pageData.baseurl}      



          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.