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?
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:
Does that help?
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
Chris
Re: [chris] Subdomains and <?php echo $upload['urlPath'] ?>
By sidcam - August 25, 2010
Cool, I didn't know I could do that. Totally worked, THANKS!
To answer your questions anyway...
CMS Builder is setting on the primary domain (stlagent.com/<CMS Directory>). All other uploads for the installation are stored in the typical CMS Builder location.
The ONLY thing I want to use that subdomain for are these PDF files (25 or so a week) and the one list view page.
I'm banishing them to a subdomain because over time there were so many of them they were hijacking the overall site's SEO.
To answer your questions anyway...
CMS Builder is setting on the primary domain (stlagent.com/<CMS Directory>). All other uploads for the installation are stored in the typical CMS Builder location.
The ONLY thing I want to use that subdomain for are these PDF files (25 or so a week) and the one list view page.
I'm banishing them to a subdomain because over time there were so many of them they were hijacking the overall site's SEO.