Page 1 of 2

internal links without http: ?

Posted: Thu Dec 13, 2007 7:35 am
by OlafNoehring
Hi

shouldn't all links that are internal only be without the http:// ?
I have noticed, that for examle the tage breadcrumbs, edit, next and previous page and print are putting the http:// in front of the links.
I belive that the http should not be put here for the following reasons
a) what if users build their site on https?
b) for CSS enhancements of links. Example: mark all external links with an icon using the following in your css:

Code: Select all

/* all A tags whose HREF attribute starts with http: */
a[href ^="http:"] {
	padding-right: 18px;
    background: transparent url(icon_mailto.gif) no-repeat center right;
   
}
The second reason was the one that made me start this thread I admit ;-)

What do you think?

Olaf

--
http://www.team-noehring.de

Re: internal links without http: ?

Posted: Thu Dec 13, 2007 6:12 pm
by Pierre M.
Hello,

Here is my opinion (if I understand well, I agree with you) : I think links should be as relative as possible :
-short, relative, internal links : /products/spaceship.html (or even spaceship.html)
-long, absolute, external links : http://www.cmsmadesimple.org/

BTW, thank you for the CSS tip.

Pierre M.

Re: internal links without http: ?

Posted: Fri Dec 14, 2007 5:18 pm
by OlafNoehring
Hi

I posted the css markups here: http://forum.cmsmadesimple.org/index.ph ... 837.0.html

Yes, your urls are correct, but concerning CMSMS ist should be even shorter. Example
index.php?page=mytarget
will be enough most of the time (of course mytarget is the pagealias)

Olaf

Re: internal links without http: ?

Posted: Fri Dec 14, 2007 6:28 pm
by kermit
the root url of cmsms is specified in config.php -- and it appears that provisions are in place for a secure, https, site... generated links should start with https:// if https is detected.

once upon a time when web sites were done the 'hard way', it was more convenient to use relative links ("somepage.html"), or relative to a domain root ("/apath/somepage.html") so a site could be easily moved from server to server. but with a system where menus and links are automatically generated, that doesn't matter any more.

in the case of search engines; it is best to specify the full and exact url for all links, including internal ones.. to ensure that the correct domain, and ONLY the correct domain, gets indexed. consider if your server responds to www.domain.com and domain.com (or even someotherdomain.com) -- if a search engine crawls and indexes all of them, you might find yourself penalized or dropped from that index due to "duplicate content".

Re: internal links without http: ?

Posted: Fri Dec 14, 2007 6:28 pm
by Pierre M.
Yes, spaceship.html is the same as index.php?page=spaceship but with pretty URLs.

Pierre

Re: internal links without http: ?

Posted: Fri Dec 14, 2007 6:35 pm
by Pierre M.
Hello kermit,
kermit wrote: once upon a time when web sites were done the 'hard way', it was more convenient to use relative links ("somepage.html"), or relative to a domain root ("/apath/somepage.html") so a site could be easily moved from server to server. but with a system where menus and links are automatically generated, that doesn't matter any more.
I disagree : relative links still work, they are prettier so I prefer them. No need for absolute links.
kermit wrote: in the case of search engines; it is best to specify the full and exact url for all links, including internal ones.. to ensure that the correct domain, and ONLY the correct domain, gets indexed. consider if your server responds to www.domain.com and domain.com (or even someotherdomain.com) -- if a search engine crawls and indexes all of them, you might find yourself penalized or dropped from that index due to "duplicate content".
You are describing a broken webserver here. Every (true) webmaster applies some rules for canonical names to publish a website.

Pierre M.

Re: internal links without http: ?

Posted: Fri Dec 14, 2007 6:39 pm
by kermit
Pierre M. wrote: You are describing a broken webserver here. Every (true) webmaster applies some rules for canonical names to publish a website.
we aren't always dealing with "true" webmasters here, though are we. ;)  how many do you suppose have things set up 'exactly right'?

Re: internal links without http: ?

Posted: Fri Dec 14, 2007 6:45 pm
by Pierre M.
Yes kermit, I agree. I couldn't resist the temptation to leak what I think is a best practice ;)

Pierre

Re: internal links without http: ?

Posted: Sat Dec 15, 2007 3:36 pm
by OlafNoehring
Hi

I do not see the problem with search engines: If they find and crawl your site - great. I always actually expect (!) that http://www.mysite.com works as well as http://mysite.com
I also expect that search engines are aware of this, especially when the www subdomain has been used.
There is no reason to use absolute links, as "absolute" is simply created with the domain name in CMSMS. This could simply be skipped and - would be even more consistent then: In CMSMS the links in the menu are relative!

Whatever way links are handled in CMSMS - they should be created / treated the same way: Either absolut or relativ. Only this way we (users/admins) can for example create CSS appropiate to the links (what was the initial thought for this thread).

Olaf

Re: internal links without http: ?

Posted: Mon Dec 17, 2007 6:43 am
by cyberman
OlafNoehring wrote: I do not see the problem with search engines: If they find and crawl your site - great. I always actually expect (!) that http://www.mysite.com works as well as http://mysite.com
But there is a problem. Please make a look at the SEO forums.

If there is a page mysite.com and www.mysite.com search engine will see that as double content. You page rank will go down ...

Re: internal links without http: ?

Posted: Mon Dec 17, 2007 3:17 pm
by Pierre M.
cyberman wrote: there is a problem. Please make a look at the SEO forums.

If there is a page mysite.com and www.mysite.com search engine will see that as double content. You page rank will go down ...
Yes, true. Use a canonical place to publish your content on the web.

Pierre

Re: internal links without http: ?

Posted: Mon Dec 17, 2007 4:30 pm
by OlafNoehring
Hi

well, ok, if this is so (and we should at least mention, that probably google is the search engine we are talking off) I am still asking for short URLs to be created by CMSMS.
It's the admins responsiblity to care about possible subdomains (www.).
a) Either say well, it's ok or
b) forward people from www to non-www (non-subdomain) addresses of your site.

Both is possible and b) is not to hard.
So far CMSMS is inconsistent with it's usage of links. One way or another - it should be consistent, so that admins can find a way to deal to the situation (e.g. CSS for link types, subdomains)

Olaf

Re: internal links without http: ?

Posted: Mon Dec 17, 2007 5:47 pm
by kermit
if you don't like the full, absolute links generated by cmsms; write a smarty modifier to strip them out.

Re: internal links without http: ?

Posted: Thu Dec 27, 2007 9:39 am
by OlafNoehring
Hi

well, good to know that this works. But
a) I can not write this since I do not know enough about smarty
b) I suppose other admins can not do this either.

Maybe there could be a setting for this - or someone else could write that modifier, maybe as a user defined tag (and post that tag here)?

Olaf
--
http://team-noehring.de

Re: internal links without http: ?

Posted: Fri Dec 28, 2007 6:56 pm
by Pierre M.
Hello,
OlafNoehring wrote: a) I can not write this since I do not know enough about smarty
b) I suppose other admins can not do this either.

Maybe there could be a setting for this - or someone else could write that modifier, maybe as a user defined tag (and post that tag here)?
I second this nice idea.

Pierre M.