Handling URL wildcards

Author Message

Pascal France

Wednesday 13 May 2009 1:26:21 am

Hi,

I'm working with eZP 4.1.1 and there is something I don't understand with the handling of the URL wildcards.

If I set:

URL alias wildcard: ezinfo/about
Destination: /

then the URI http://mysite/ezinfo/about is redirected to http://mysite/ (so that the <i>about</i> page is not displayed). Ok.

Now, I have an item (item1) in my menu which is a link (<i>link</i> object class) to another node of my site. So that, when we clic this item we are redireted to this another node.

But if I write the following URI:

http://mysite/item1/

directly in the adress barre of my browser then it is the default view template (/node/view/full.tpl) wich is displayed. Ok.

So, I set a new redirection like that:

URL alias wildcard: item1
Destination: /

But it does not work. I have tried many syntaxes without success.

It seems there is something I misunderstand :-(

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Wednesday 13 May 2009 1:59:43 am

Hi,

The node ID of <i>item1</i> is 201.
I have tested this setting:

URL alias wildcard: content/view/full/201
Destination: /

and the redirection of http://mysite/content/view/full/201 works perfectly.

But

URL alias wildcard: item1
Destination: /

still does not work.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Wednesday 13 May 2009 3:46:57 am

Hi,

I'm always looking for a solution...

The nodeID of <i>item1</i> is 100 and the generated alias is named <i>item1</i> and points to content/view/full/100

In the interface for managing the URL aliases of the content node 2 I have set a new alias named </i>content/view/full/100</i> wich points to /

So now http://mysite/content/view/full/100 goes to http://mysite/.
But http://mysite/item1 does not go to http://mysite/

If <i>item1</i> points to content/view/full/100 and content/view/full/100 to / why <i>item1</i> does not points to / ?!

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Nicolas Pastorino

Friday 15 May 2009 4:40:48 am

Hi Pascal,

The issue you are encountering is that you cannot override a system-generated URL alias, like http://mysite/item1/.

Alternative to this could be, ordered by increasing cost :
* Use javascript redirection to the root of your site. This can be implemented in the Link's class full view. Not the cleanest solution SEO-wise
* Develop a clean redirection operator, used in the afore-mentioned template.

Let us know how things go,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

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 19 2025 00:22:54
Script start
Timing: Jan 19 2025 00:22:54
Module start 'layout'
Timing: Jan 19 2025 00:22:54
Module start 'content'
Timing: Jan 19 2025 00:22:55
Module end 'content'
Timing: Jan 19 2025 00:22:55
Script end

Main resources:

Total runtime0.7851 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.9141152.6250
Module start 'layout' 0.00540.0025 740.539139.4609
Module start 'content' 0.00790.7760 780.0000556.0391
Module end 'content' 0.78390.0012 1,336.039112.1719
Script end 0.7851  1,348.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4066160.0002
Check MTime0.00140.1741160.0001
Mysql Total
Database connection0.00070.087110.0007
Mysqli_queries0.725192.3564600.0121
Looping result0.00060.0759580.0000
Template Total0.754996.120.3774
Template load0.00230.292620.0011
Template processing0.752695.854620.3763
Template load and register function0.00020.023110.0002
states
state_id_array0.00090.115910.0009
state_identifier_array0.00140.183920.0007
Override
Cache load0.00200.2514480.0000
Sytem overhead
Fetch class attribute can translate value0.00090.112120.0004
Fetch class attribute name0.00100.129650.0002
XML
Image XML parsing0.00080.098420.0004
class_abstraction
Instantiating content class attribute0.00000.001450.0000
General
dbfile0.00090.1114160.0001
String conversion0.00000.001140.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs