Tuesday, June 29, 2010

Alfresco installation: installing pdf2swf

For redhat / rpm based distribution:
yum install zlib-devel libjpeg-devel giflib-devel freetype-devel gcc gcc-c++

For debian / ubuntu / apt based distribution:
sudo apt-get install zlib1g-dev libjpeg-dev libgif-dev libfreetype6-dev



sudo make install

Monday, June 7, 2010

URL Rewrite for alias with parameter

When we need to redirect certain alias to another url,
we can modify htaccess file to handle redirection with the code below:

Example: redirect blabla to /articles/index
RewriteRule ^blabla(/)? /articles/index$1 [R,L]
The above work if our url goes:
http://www.example.com/blabla or http://www.example.com/blabla/

If we may have sub folders within bla bla or need to pass in additional parameter (as common in zend framework):
RewriteRule ^blabla(/)?(.+)? /articles/index$1$2 [R,L]
The above work if our url goes: