Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-10-26 03:57:55
- capa
- Member
- From: Montana, USA
- Registered: 2005-09-10
- Posts: 20
Re-phrasing the question: absolute/relative paths
I’m working on shaping my pottery.
I’ve been a fan of relative paths ( /text/mywords.html is more fun than http://www.mysite.com/text/mywords.html , for example ) ever since I started using HTML. (Textpattern is the first CMS I’ve ever used)
But now when I look at the HTML that Textpattern generates, I see the full path in all my links! :(
Is there a way to change what I’m getting now:
<code>
<h2><a href=“http://localhost/textpattern-4.0/news/26/the-council-works-hard” title=“Permanent link to this article”>the council works hard</a></h2>
</code>
(that was generated by <code><h2><txp:permlink><txp:title/></txp:permlink></h2> </code>in a form, btw)
into this:
<code>
<h2><a href=”/news/26/the-council-works-hard” title=“Permanent link to this article”>the council works hard</a></h2>
</code>
?
TIA
- Capa
“I like the look of my own text.”
Offline
#2 2005-10-26 04:34:25
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Re-phrasing the question: absolute/relative paths
Sure, you could find the dozens of places where this kind of thing is done (look for ‘hu’), and figure out a way to change them without breaking anything.
But, er, why?
Alex
Offline
#3 2005-10-26 04:43:16
- capa
- Member
- From: Montana, USA
- Registered: 2005-09-10
- Posts: 20
Re: Re-phrasing the question: absolute/relative paths
why:
1) using paths this way made sense to me with static html. I could move my site from one host to another, and none of the links would break (full path = busted when hosted elsewhere)
2) I always assumed it was more efficient for the computers to look up a path like /text/mywords.html than to look up a full domain and the path http://www.mysite.com/text/mywords.html
Doesn’t the web browser have to do a DNS lookup on the domain when you use a full path? Or am I misunderstanding the way it works?
“I like the look of my own text.”
Offline
Re: Re-phrasing the question: absolute/relative paths
<blockquote>1) using paths this way made sense to me with static html. I could move my site from one host to another, and none of the links would break (full path = busted when hosted elsewhere)</blockquote>
Textpattern creates the host part of its addresses from the Site URL value in preferences. If you update the site url after changing hosts/domains/whatever, all TxP-generated permalinks (and prev/next links, etc.) will change accordingly.
Last edited by Elenita (2005-10-26 05:26:22)
Offline
Re: Re-phrasing the question: absolute/relative paths
2) I always assumed it was more efficient for the computers to look up a path like /text/mywords.html than to look up a full domain and the path http://www.mysite.com/text/mywords.html
Doesn’t the web browser have to do a DNS lookup on the domain when you use a full path? Or am I misunderstanding the way it works?
Yes, misunderstanding it. The browser is doing the same requests no matter how you’re links are formed, the two are not related.
Offline
#6 2005-10-26 12:24:50
- NXArmada
- Member
- From: Sevierville, TN
- Registered: 2005-09-13
- Posts: 82
Re: Re-phrasing the question: absolute/relative paths
<blockquote>1) using paths this way made sense to me with static html. I could move my site from one host to another, and none of the links would break (full path = busted when hosted elsewhere)</blockquote>
The link’s if you use full path well only break if you change your domain name after changeing host. If your domain Name stays the same on the new host it well be fine.
And what Elenita said also.
Ryan
Offline
#7 2005-10-26 15:25:24
- capa
- Member
- From: Montana, USA
- Registered: 2005-09-10
- Posts: 20
Re: Re-phrasing the question: absolute/relative paths
I see. Thanks for your help!
I understand the solution to my problem … there is no problem. :)
“I like the look of my own text.”
Offline
#8 2005-10-26 16:00:39
- capa
- Member
- From: Montana, USA
- Registered: 2005-09-10
- Posts: 20
Re: Re-phrasing the question: absolute/relative paths
By the way, feel free to check my final static HTML site:
http://tucker.ees.com/polson/
Uses CSS. No tables at all!
“I like the look of my own text.”
Offline