Working on site preview URL

4 posts by 3 authors in: Forums > CMS Builder
Last Post: August 24, 2009   (RSS)

Hey,

We are in the process of switching a CMS install to a new server.

We only have a temporary site preview URL (provided by the host) on this new server at moment, which is in format:

https://xx.xxx.xxx.xxx:xxx/sitepreview/http/accountname/

I.e. it's within directories, not root.

The problem is that we aren't working on root, but CMSB does - for example:

https://xx.xxx.xxx.xxx:xxx/sitepreview/http/accountname/cmsAdmin/admin.php

Logging in (or doing anything), will automatically send you to:

https://xx.xxx.xxx.xxx:xxx/cmsAdmin/admin.php

-- which does not exist because we're working on site preview URL, within a sub-directory.

I have tried adding:

<base href="https://xx.xxx.xxx.xxx:xxx/sitepreview/http/accountname/" />

into the lib/menus/header.php

but this doesn't seem to make any difference to targets of CMSB.

Is there anything else I can add/hack to ensure it assumes https://xx.xxx.xxx.xxx:xxx/sitepreview/http/accountname/ as the default ROOT.

I'm happy to hack the settings or lib files - but just don't know where/what to set.

Any help would be most apprecaited.

Many thanks
Rob

Re: [chris] Working on site preview URL

Hi,

How did you rename your directory - simply within FTP, or did you need to change any settings within the CMSB?

The issue isn't necassarily CMS Directory NAME, but location to root of the server...

Because all of the actions within the CMS code are relative to root (i.e. /cmsAdmin/admin.php as oppose to cmsAdmin/admin.php) --- so this sends it to ROOT of the server, whereas I need it to stay within its subdirectory.

So, either by hacking the CMS to tell it ROOT is actually somewhere else, or by making paths not relative to root (although this is a quite large task manually).

I have raised a support ticket with FTP details.

Cheers

Re: [rjbathgate] Working on site preview URL

By Dave - August 24, 2009

Hi Rob,

CMSB doesn't actually reference root paths (/cmsAdmin/...) anywhere. So you can install it in other directory locations no problem.

CMSB auto detects the current url. What I suspect is happening is that your hosts preview url setup isn't correctly setting some PHP variables. We may be able to add some code to work around what they're doing (or not doing). Can you send me an email with the ticket number you submitted? (You should get an auto-reply with a ticket ID).

Thanks!
Dave Edis - Senior Developer
interactivetools.com