Forums / Install & configuration / Handling URL wildcards

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