Permissions for Joomla using Plesk and Virtuozzo

Filed Under (Joomla! 1.0, Joomla! 1.5, Plesk/Virtuozzo, Ubuntu) by khawaib on 15-08-2010

Tagged Under : , , , , , , , , , ,

Change the umask in ‘/etc/proftpd.conf’ from ’022′ to ’002′.

Then, update the directory permissions by running the following at the command line:

cd /var/www/vhosts/[domain.com]
chown -R [username]:psacln httpdocs
chmod -R g+w httpdocs
find httpdocs -type d -exec chmod g+s {} \;

Add the ‘apache’ user to the ‘psacln’ group by editing ‘/etc/group’.

psacln:x:2524:apache

www or no www in urls

Filed Under (Facebook, Joomla! 1.0, Joomla! 1.5, Ubuntu) by khawaib on 01-08-2010

Tagged Under : , , , , , , , ,

You can enter your website urls with a www or with no www. Which is better I leave for you to google and find out yourself. Using both is not a good idea as search engines and Facebook will not treat them same and will cause problems.

Solution is to force one of them to be used and not both. So if a users enters http://www.youtsite.com gets to http://yoursite.com and vice versa.

Solutions 1: Using Mod Rewrite
Following code should be placed in htaccess file in root directory of your website.

If your want to http://www.yoursite.com use following code:

<IfModule mod_rewrite.c>
   Options +FollowSymLinks
   Options +Indexes
   RewriteEngine On
   RewriteBase /
   RewriteCond %{HTTP_HOST} ^domain\.com$
   RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
</IfModule>

If your want to http://yoursite.com use following code:

<IfModule mod_rewrite.c>
   Options +FollowSymLinks
   Options +Indexes
   RewriteEngine On
   RewriteBase /
   RewriteCond %{HTTP_HOST} ^www\.domain\.com$
   RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
</IfModule>

Joomla website users:
You can use following free plugin from JED
http://extensions.joomla.org/extensions/site-management/url-redirection/10527

How to get currect SEF URL in Joomla 1.0

Filed Under (Joomla! 1.0) by khawaib on 26-04-2010

Tagged Under : , , , , , ,

$uri is global variable which holds current SEF url in Joomla 1.0

global $uri;
$thisurl = 'http://'.$_SERVER['SERVER_NAME'].DS.'component'.DS.$uri[1];