Change relative to absolute links in the project

Author Message

Elena Stoycheva

Thursday 04 November 2010 3:03:05 am

Hi, there,

Yesterday I got an article comparing relative and absolute links: [http://www.searchenginejournal.com/seo-internal-interlinking-relative-vs-absolute-urls/7000/]. In brief, the article is saying that the absolute links are much better and safer than the relative links. I decided to migrate from relative to absolute links in my project as I just applied parameter type 'full' to ezurl/ezroot operators. The problem, however, is that my project uses some templates from external extensions in which most of the links are still relative. So, my question is "Is there any way to change all relative links in my project to absolute?". Any help and further experience is appreciated! Thanks in advance!

Best regards,

Eli

Iguana IT - http://www.iguanait.com

Gaetano Giunta

Thursday 04 November 2010 3:25:22 am

I do agree with the comment from John Doherty in the original blog post - to me most of the reasons stated for using absolute urls are either useless or only valid when you code them by hand - when it's a cms that outputs them for example it's the role of the cms to have alternate versions of the urls generated for eg. emails.

If you want to make sure your site is not framed in a leecher's site, you can add some js that checks for it and reloads the page using the original url. But do leechers still exist in 2010?

I'd not waste time in that conversion... But that's just my opinion ;-)

Principal Consultant International Business
Member of the Community Project Board

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:17:51
Script start
Timing: Jan 18 2025 02:17:51
Module start 'layout'
Timing: Jan 18 2025 02:17:51
Module start 'content'
Timing: Jan 18 2025 02:17:52
Module end 'content'
Timing: Jan 18 2025 02:17:52
Script end

Main resources:

Total runtime1.0573 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.1641152.6406
Module start 'layout' 0.00700.0033 741.804739.4844
Module start 'content' 0.01031.0457 781.2891521.8984
Module end 'content' 1.05600.0013 1,303.18758.1250
Script end 1.0573  1,311.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3187160.0002
Check MTime0.00130.1212160.0001
Mysql Total
Database connection0.00140.135210.0014
Mysqli_queries1.009095.4295540.0187
Looping result0.00050.0486520.0000
Template Total1.021396.620.5107
Template load0.00240.226320.0012
Template processing1.018996.368420.5095
Template load and register function0.00020.016510.0002
states
state_id_array0.00090.086510.0009
state_identifier_array0.00120.113620.0006
Override
Cache load0.00200.1894120.0002
Sytem overhead
Fetch class attribute can translate value0.00060.061520.0003
Fetch class attribute name0.00100.098330.0003
XML
Image XML parsing0.00080.079820.0004
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00340.3168160.0002
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs