eZ Community » Forums » Setup & design » PathPrefix and media and users folder...

PathPrefix and media and users folder problem

PathPrefix and media and users folder problem

Monday 16 January 2006 9:55:11 am - 10 replies

Hi all,

I have two websites that share the same users and media folders but that have different content.

What I did was to create to siteaccess (siteA and siteB) and two main folders under content siteA and SiteB.

All the content for the site a is under the siteA folder, same goes for site b.

To avoid having /sitea/thepage, I put into the siteA site.ini.append:


Works great for all the content, but I can't access anymore the content into the media and users folder !

I guess that's because the PathPrefix also applies to /media (and it tries to look at /siteA/media). I've tried to cheat and add a location for the media folder and put it under siteA and SiteB, but it doesn't work (error message).

Is there a way to exclude media and users from the PathPrefix ? Any idea to solve it ?

Thanks in advance,


Monday 06 March 2006 4:54:12 pm

Hello Xavier,

I ran into the same problem...
Did you find a satisfactory solution?


Tuesday 14 March 2006 5:34:38 pm


I've the same problem too.
Did you find a solution ?

Wednesday 15 March 2006 2:48:23 pm


As I understand it in the meantime, there are two beginner-ways:

1. with pathprefix: niceurls for content, system-urls ( content/view/...) for media and user

2. without pathprefix: niceurls everywhere, but one more level in the url...

You could give your first-level folders a very short name, "a" for example, ...
or reorganize the folder-structure (like I did)

Or you have to do some scripting...
blunk.gif Emoticon)

Greets Christiane

Wednesday 15 March 2006 3:24:30 pm


That's what I did: I overrided a few classes display in the sections user and media. Now, instead of using node.nice_url it uses content/view/full/{$node.node_id}

That's not very elegant, but it works.


Tuesday 21 March 2006 8:51:48 pm

Hi Xavier,

I've been playing around with PathPrefix myself latly, and found out that my code for producing bradcrumb and title does not take this into account.

{foreach $module_result.path as $pathindex => $item}
	{if gt($pathindex, 1)}
    {if $item.url}
        {if is_set($item.url_alias)}
            <a href={$item.url_alias|ezurl}>{$item.text|wash}</a> /
            <a href={$item.url|ezurl}>{$item.text|wash}</a> /
		{if gt($pathindex, 2)}

Have you encountered the same thing ?

Tuesday 21 March 2006 8:58:06 pm


I filed a bug report, and it's been confirmed. Hopefully that's going to be fixed soon...


Tuesday 21 March 2006 9:01:02 pm

@André R.

What version of ez do you use ?

I have to admit I never use ezurl anymore, as all my sites are with mod_rewrite.

I simply do href="/{$node.url_alias}" as I've had problem in the past (read 3.1 or 3.2) with intempestive index.php that where added here and there.

Bad habit dies hard blunk.gif Emoticon


Friday 24 March 2006 3:29:28 pm

I'm using 3.7.5svn 23.03.06

take a look here:


see the url for the "Bisv /" link, so seems the problem is only for links to the "root" of the given siteaccess

Wednesday 05 July 2006 12:07:48 pm

Fixed in
3.6.9 (stable/3.6 rev. 16344),
3.7.7 (stable/3.7 rev. 16343),
3.8.2 (stable/3.8 rev. 16345),
3.9.0alpha1 (trunk rev. 16346).

Sunday 01 July 2012 4:53:04 pm

For those who still haven't found the solution, use PathPrefixExlude. See http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/SiteAccessSettings/PathPrefixExclude.


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from