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.
Old November 25th, 2009, 1:37 AM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jul 2007
Lives in Montreal
Hosted on SH96 & SH129
14 posts
Gave thanks: 0
Thanked 0 times
easy bginner question about url

here is what I'm triing to do, but I don't seem to succed in doing this.

I want people to be able to get to a page of my website in two manners..
this way "www.emmanuelthivierge.com/cv/" and this way cv.emmanuelthivierge.com. At first i was using relative url for the css this way "../css/layout.css" or even this "/css/layout.css" work for the "www.emmanuelthivierge.com/cv" but both don't work for the cv.emmanuelthivierge.com because it can't find the css file in "cv.emmanuelthivierge.com/css/layout.css"

I know I can use absolute url but I think this is so more clear "/css/layout.css" knowing it is from the root. i could also point all my links in for example home.html to cv.emmanuelthivierge.com

Do I have other solution? The best would be to keep my link pointing to emmanuelthivierge.com/cv and my css in kind of relative way... Am-I asking for something impossible?

thanks alot
__________________
SH96, SH129

Last edited by monami; November 25th, 2009 at 1:43 AM..
monami is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 25th, 2009, 5:27 AM   #2 (permalink)
Surpass Fan
On a golden path...
 
Rick's Avatar
 
Joined in Sep 2004
Hosted on Pass42
319 posts
Gave thanks: 7
Thanked 56 times
You could do this with a symbolic link to the css folder in your cv folder. i.e.,

Code:
cd /home/USERNAME/public_html/cv
ln -s /home/USERNAME/public_html/css css
This will create a css folder within the cv folder that is a symbolic link to the css folder in public_html. So now any css files in public_html/css will also appear in public_html/cv/css.
__________________
Rick is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 25th, 2009, 5:49 AM   #3 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,510 posts
Gave thanks: 21
Thanked 104 times
One thing you could do is add the following to the top of a .htaccess file in your /cv/ folder that has:
Code:
Redirect permanent /cv http://cv.emmanuelthivierge.com
This will force anyone trying to access the site with "emmanuelthivierge.com/cv/whatever" to be automatically redirected to "cv.emmanuelthivierge.com/whatever"

I do this will all my sub-domains.
__________________
SH102 : Mark Headrick - Blog - Gallery
Pelicar | Company of Valor | Mysstie
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 25th, 2009, 4:06 PM   #4 (permalink)
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
963 posts
Gave thanks: 2
Thanked 102 times
../ backs up one folder :: .//.// backs up two folders, etc
/ backs up to the root folder :: username/

so use:

./ which says to the server "you will find it in this same folder as the calling script"

.
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
url absolute relative


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

Advanced Search
Rate This Thread
Rate This Thread:

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