Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Linking relative to site root

Guest
Apr 06, 2007 Apr 06, 2007
This seems that it should be a simple problem, but for the life of me, I am having trouble with using links relative to the site root on my CFML site. Here is my configuration:

I have the wwwroot folder installed on my "L" drive. My site folder is HMS_EP which is inside the wwwroot folder. So the

Local Root Folder: L:\ColdFusionMX7\wwwroot\HMS_EP\
HTTP address: http://localhost:8500/HMS_EP/
Remote Access: None

Testing server folder: L:\ColdfusionMX7\wwwroot\
URL Prefix: http://localhost:8500/HMS_EP/

Ok, my site is working fine with these settings, except for links relative to site root. I always have to manually enter the folder /HMS_EP/ which is a crashing pain.

I would have thought the URL prefix http://localhost:8500/HMS_EP/ would address this issue, but it doesn't. I've tried it with and without the "HMS_EP" subdirectory included.

Any thoughts on using linking relative to site root when you have multiple sites in separate folders in the wwwroot folder?

Thanks alot for your thoughts.

All is working just fine and dandy, except for site linking.
TOPICS
Server side applications
582
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 06, 2007 Apr 06, 2007
I am not sure what is causing your intial problem but I wanted to comment on your statement:

"Any thoughts on using linking relative to site root when you have multiple sites in separate folders in the wwwroot folder?"

It may be easier if you create multiple sites instead of have multiple folders inside of a single wwwroot. This would allow you to do absolute paths without problems previewing the pages locally.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 06, 2007 Apr 06, 2007
I do have multiple site files created - one for each actual site. But I always create each site in its own folder. Should I just lob the whole merry batch of files into the wwwroot folder and let Dreamweaver keep track of which pages, cfm files, graphics, folders, etc go with each site?

Seems beyond cluttered to me to do it that way.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 06, 2007 Apr 06, 2007
I am not talking about creating mutliple site files, but multiple sites within IIS. I am thinking this is your current set up:

L:\ColdFusionMX7\wwwroot\
--->Site 1
--->Site 2
--->Site 3

You are placing each site you create within your own systems wwwroot. Basically your systems wwwroot is a single local site within IIS. You can create multiple local sites on your system. So you could have this instead:

L:\ColdFusionMX7\SIte1www\
L:\ColdFusionMX7\Site2www\
L:\ColdFusionMX7\Site3www\

This would allow you to use absolute paths without having problems with paths and viewing the site locally.

I hope I am not confusing you.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 07, 2007 Apr 07, 2007
> Any thoughts on using linking relative to site root when you have multiple
> sites in separate folders in the wwwroot folder?


Hey, I feel your pain!! I've been wondering the same thing for years, and
every time I post a question about it, nobody seems to know what I'm talking
about. I guess you and I are the only ones with multiple sites to maintain.
Here's what I've come up with:

It depends on your OS.

In WinXP and earlier, I use this file structure:
C:\Inetpub\BaloneyWebSite\, C:\Inetpub\TomatoSoupWebsite\... Since XP only
supports one website, I have a small utility that changes my local root
folder in IIS. It resides in the
taskbar by the clock, and it quickly changes the root path. I don't remember
where I got it, but I'll post a link if you want. You will view your website
by browsing to http://localhost/

In Vista, again I use the same file structure, but since Vista supports
multiple websites, the utility to change the root folder is not required.
Put the files in the same directory structure, but add a host header and add
a line in the hosts file to point to it. For example, in IIS, edit the web
site binding to Type = http, IP Address = All Unassigned, Port = 80, Host
Header = BaloneyWebSite. Then edit C:\Windows\System32\drivers\etc\hosts
adding a new line (127.0.0.1 BaloneyWebSite). You can view your website
locally by
browsing to http://BaloneyWebSite/

HTH

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 07, 2007 Apr 07, 2007
Hmm, thanks for your input, Ted Dawson & envision3d. Both of you mentioned used IIS as the webserver. Maybe I'm the oddball by not using IIS for the webserver. I'm just using the builtin server in ColdFusion without running IIS at all.

Thanks for your input Ted. Sounds like someone else has run into this. I'm upgrading to Vista in about a month, so maybe the end is in site.

Just curious, why are you using IIS when you could just use CF?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 07, 2007 Apr 07, 2007
> Just curious, why are you using IIS when you could just use CF?


ASP.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 07, 2007 Apr 07, 2007
LATEST
Duh, just assumed you were using CF, well, uhm, because I was.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines