Subdomains and <?php echo $upload['urlPath'] ?>

3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 25, 2010   (RSS)

By sidcam - August 25, 2010

I am uploading PDF files to a directory on a subdomain. Although webpages on the subdomain show the files fine, I would also like to show a list of them on my domain's index page. However the <?php echo $upload['urlPath'] ?> isn't showing the true path to the files on the subdomain. Instead it shows: domain/folder/files.

My index page is located here:
www.stlagent.com

At the bottom right corner just above my logo you will see "Updates-Home Sales".

The link "Affton Single Family Home Report (1/1/10)" is the file with the bad <?php echo $upload['urlPath'] ?>.

If you click on "read more" you will be taken to a list view page on the subdomain that works properly.

How do I make the urlPath resolve to the subdomain on my domain's index?

Re: [sidcam] Subdomains and <?php echo $upload['urlPath'] ?>

By Chris - August 25, 2010

Hi sidcam,

So the PDF is sitting on www.market-updates.stlagent.com. Where have you got CMS Builder installed? Is it also on www.market-updates.stlagent.com?

If all your uploads are going to be on that one domain, you could simply always prefix that domain on any uploaded urlPaths, like this:

<a class="l4_text" href="http://www.market-updates.stlagent.com<?php echo $upload['urlPath'] ?>">...

Does that help?
All the best,
Chris