Wednesday 07 February 2007 5:39:40 pm
Just throwing in my 2c... I use the same method as Tim's, although the (.*) is not necessary and using a catch-all wildcard in regex is generally not recommended unless you want a wholesale redirection. Mike's method works but is not safe both because of Apache's internal order of processing rules (Redirect, Alias, Rewrite and ScriptAlias - note: not in this order, just a list). You can easily run into problems if you rely on this, so it's best to be specific and tell ezPublish, via a RewriteCond, not to process those folders. Here's my general ezPublish Apache config:
ServerName example.com
ServerAlias www.example.com admin.example.com
RewriteEngine On
# no-www
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^/?(.*) http://example.com/$1 [R=301,L]
# eZ publish
# Excluding custom app folders
RewriteCond %{REQUEST_URI} !(^/app1|^/app2|^/app3) [NC]
RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages|^/packages|^/share/icons).*\.(gif|css|htc|jpg|png|jar|js|ico|pdf|swf)$ /index.php [L]
If I had more time, I would write less code.
|