icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Shared Hosting » Relative URLs

Shared Hosting Questions about your shared hosting account.

Reply
 
LinkBack Thread Tools Search this Thread
Old December 20th, 2007, 5:45 PM   #1 (permalink)
Registered User
Comfy Contributor
 
Joined in Feb 2006
Lives in Ohio
Hosted on SH93
119 posts
Gave thanks: 4
Thanked 0 times
Relative URLs

I have a site that I can access just fine from home. At school, there is a filter set up that for some reason blocks my site. Now I usually dont have a problem with this, but if for some reason I need to access my site, I can go to servername.surpasshosting.com/~user, but this breaks all of my navigation images. Is there a way I can use relative paths and have it work on both the subfolder and the regular name?

TIA,
Brennan
__________________
BrennanU is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old December 20th, 2007, 5:48 PM   #2 (permalink)
URB4N 5K1LLZ
Super #1
 
Roxy's Avatar
 
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,660 posts
Gave thanks: 81
Thanked 128 times
By any chance from your house to your school, are you using different browsers? If so, which ones for each.
__________________
Roxanne


Urban Roxy -Personal Blog
SH63 - the best darn shared server!
Roxy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old December 20th, 2007, 5:57 PM   #3 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,222 posts
Gave thanks: 18
Thanked 86 times
For that to work, need to make sure all links are coded as
Code:
<a href="childdir/file.html">
to load a file in a directory below the current one
Code:
<a href="/rootdir/file.html">
to load a file with the path starting in public_html or
Code:
<a href="../file.html">
to load a file in a directory above the current one, or
Code:
<a href="file.html">
to load a file in the same directory as the current page.

Hopefully that made sense. That's what I do so my website works the same with www.markheadrick.com and www.markrh.com and my local test server.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old December 20th, 2007, 6:02 PM   #4 (permalink)
URB4N 5K1LLZ
Super #1
 
Roxy's Avatar
 
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,660 posts
Gave thanks: 81
Thanked 128 times
when I right clicked on your site, you were already doing that? I'm confused.
__________________
Roxanne


Urban Roxy -Personal Blog
SH63 - the best darn shared server!
Roxy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old December 21st, 2007, 9:20 AM   #5 (permalink)
Registered User
Comfy Contributor
 
Joined in Feb 2006
Lives in Ohio
Hosted on SH93
119 posts
Gave thanks: 4
Thanked 0 times
I am doing relative URLs. Go to http://sh93.surpasshosting.com/~brennan
They work on my main domain but not on this page.
They are both IE7.
__________________
BrennanU is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old December 21st, 2007, 10:41 AM   #6 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,222 posts
Gave thanks: 18
Thanked 86 times
Looking at the page source, I notice a number of hard coded items that point to your domain, such as where you are loading your brand.js javascript file from. Also, I notice several IMG src tags that are hard-coded to use your domain name.

But yeah, you need to look at everything... your CSS, Javascript, IMG tags or anything that references something.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On