Path / documentation / ez publish / technical manual / 4.4 / installation / virtual host setup / ez js core rewrite rules

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

eZ JS Core rewrite rules

These re-write rules are described under the description of the eZ JS Core extension, but since this extension is bundled with eZ Publish and as such an important part of the installation process, please find the eZ JS Core rewrite rules described here as well.

Rewrite rules for lib folder

The eZ JSCore extension requires correct re-write rules in order to load the necessary yui (yahoo user interface) files from the file system. This is required only when the INI setting "ezjscore.ini[eZJSCore]LoadFromCDN" is disabled.
Add the following line to your Virtual-Host setup:

^/extension/[^/]+/design/[^/]+/(stylesheets|flash|images|lib|javascripts?)/.* - [L]

Rewrite rules for script/css packing

eZ JsCore packs javascript/css files together to decrease server requests and file size for faster download. On eZ Publish 4.0.x you'll need to make the following changes if you havn't already when installing ezoe (Online Editor 5.0).

  • .htaccess


RewriteRule !\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php


RewriteRule !(\.(gif|jpe?g|png|css|js|html?)|var(.+)storage.pdf(.+)\.pdf)$ index.php
  • Virtual Host mode


RewriteRule ^/var/([^/]+/)?cache/public/.* - [L]

   If you don't manage to get these working, you can disable this feature by setting ezjscore.ini[eZJSCore]Packer=disabled

(optional) Speedup ajax calls

Copy or symlink index_ajax.php from this extension to the root folder of eZ Publish (next to index.php). Add the following rewrite rule:

  • .htaccess
RewriteRule ezjscore/call.* index_ajax.php
RewriteRule ^index_ajax\.php - [L]
  •  Virtual Host mode
RewriteRule ^/([^/]+/)?ezjscore/call.* /index_ajax\.php [L]

Geir Arne Waaler (05/10/2011 6:27 am)

Geir Arne Waaler (05/10/2011 6:27 am)


There are no comments.