homepage Welcome to WebmasterWorld Guest from 54.198.42.105
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
subdomain page not working
Page jscript not rendering properly
Rhys




msg:3641761
 5:56 am on May 5, 2008 (gmt 0)


I use a .js included menu in my html pages in my subdomains and half the menu works fine, but the other half not.

It behaves as intended and written when the page is called from the folder; i.e., example.com/subdom/index.htm - but breaks when called as subdom.example.com

Both parts of the script contain only absolute links.

 

jdMorgan




msg:3642835
 1:51 pm on May 6, 2008 (gmt 0)

> Both parts of the script contain only absolute links.

If that is true, it's difficult to understand why you'd have a problem.

For further investigation, I'd suggest a review of your server error log file, and using a server headers checker such as the "Live HTTP Headers" add-on for Firefox and Mozilla-based browsers. Using these tools, you can get a better view of the requests that the server is receiving, the filepaths that the requested URLs resolve to, and the responses that your server is sending to the client.

Jim

Rhys




msg:3643564
 4:36 am on May 7, 2008 (gmt 0)

Thanks for your reply jdMorgan -
Nothing shows on the error log
I moved the .js into the same folder as the index file and it all works as expected.

There seems to be some unexpected results when calling included files from a sub-domain, but I can't find any "rule of Thumb" to explain so I can understand it.
I have had similiar problems in the past with Style sheets not working when requested from the root folder to a sub-domain.

If someone you point me to a solution to this I will be very grateful. (Please do not use tech language to explain) I have read lots of posts/replies about .htaccess and folders, but can't get my head around it because I don't understand the tech terminology.

Rhys




msg:3644475
 6:50 am on May 8, 2008 (gmt 0)

I found most of the answer on a different forum.
"the subdomain is a different domain altogether, and relative links will only work within the same webspace" - therefore links to another folder(even though they are on the same server) need to be absolute.

So simple :-)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved