View Full Version : subdomain and local links problem
12-25-2007, 11:20 PM
Hey all i am having some weird issues with a site of mine being in a sub domain vs a regular directory.
When i have a page called reg.asp on the regular directory of the server (http://www.blah.com/blah/reg.asp) it works just fine. However, if i put that same file in a sub domain that I've made (http://sub.blah.com/blah/reg.asp) it doesn't load any java or css for the page as it did with the regular directory one.
Here is the javacode:
Like i said, it works just fine on the regular dirctory but doesn't in the sub domain.
Any help would be great! :)
12-25-2007, 11:53 PM
Notice anything weird with your file path? How about removing everything before the root slash (so it looks like /blah/mootools.js)?
12-26-2007, 12:11 AM
12-26-2007, 12:19 AM
Yeah, 'cause I really think that the way of addressing my drives is a letter and a vertical pipe :D
12-26-2007, 12:47 AM
You were talking about a sub domain so… I assumed you’re having that file on a server. I’d really suggest you use relative paths there or a server/domain-independent absolute path because really, that local file path is or will be causing more trouble than it needs to be.
So, change the path to either blah/mootools.js (relative path) or /blah/mootools.js (absolute path without specifying a domain/server) and it should work locally and on a remote server without ever having to change it.
The relative path setting assumes that the JS file is one level below the file calling it (i.e. the /blah directory and the current file with the script link have to be on the same level/in the same directory). The absolute path setting assumes your file in a /blah directory in the server/site root.
12-26-2007, 12:54 AM
12-26-2007, 01:22 AM
Mayhaps, you have set the regular domain as a trusted site and the subdomain is not set the same way.
12-26-2007, 01:36 AM
Already put it in my list, still nothing... :(
12-26-2007, 03:51 PM
Look, a file path for Windows using a C drive begins C:\, not C|\, as you've put here:
... file:///C|/blah/mootools ...
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.