Forums / General / Nice(er) URL's
Jakub Derdziak
Thursday 25 November 2010 5:29:40 am
Hi Everyone!
I wander, how to make url shorters, by cutting all tree structure from them. For example if we have
site.com/path/to/article
I want to get:
site.com/article
Is it possible in eZPublish.
Thanks
Jurica Perić
Thursday 25 November 2010 6:45:58 am
You can create URL Alias that will point to that article. But that action isn't automatic for all published content and you have to do it manually. You can do that under Setup -> URL Translator or URL Wildcard
Gaetano Giunta
Thursday 25 November 2010 1:25:10 pm
Url wildacrd would make a lot of sense. Or add a secondary location to your articles as children of the root node. IIRC there is an extension with a workflow event that can automate the 'add secondary location' part, on projects.ez.no
Principal Consultant International Business Member of the Community Project Board
Thursday 25 November 2010 10:45:27 pm
Thanks for the answer. I was hoping that something like this is eZPublish setting. Problem with Wildcard is that I hevce thousends of articles on site. And adding location cause Breadcrump pointless.But thanks again.
Igor Vrdoljak
Thursday 25 November 2010 10:59:35 pm
You can also check PathPrefix setting in site.ini: http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/SiteAccessSettings/PathPrefix
It adds a specified prefix to virtual URL entered by user. It is commonly used to remove parts of the generated URLs when a particular siteaccess is located under subtree in content structure, but maybe it can be useful to you.
http://www.netgen.hr/eng http://twitter.com/ivrdoljak
Bertrand Dunogier
Thursday 25 November 2010 11:33:55 pm
Depending on your site structure, I find it a little risky to make an alias straight from root level to subfolders. It would be quite easy to end up facing conflicts. What about something like /a/<article> ? It would remain really readable.
You could indeed use redirecting URL wildcards for this, it would work quite well. Are all your articles located in the same subfolder ?
Bertrand Dunogier eZ Systems Engineering, Lyon http://twitter.com/bdunogier http://gplus.to/BertrandDunogier