| Subcribe via RSS

Tutorial : Moving a website permanently with SEO-friendly

February 15th, 2010 | No Comments | Posted in Knowledges

The best way to move a website permanently and SEO-friendly is using 301 redirect. Or if you have two domain names like, example.com and example.co.uk and what you want is, every time user comes to example.co.uk the website should redirect automatically to example.com. The answer is 301 redirect.

1. create a .htaccess file in your root directory of the domain name that you want to move.
2. place this code

1
2
3
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Change www.newdomain.com to your new domain name.

Please be sure that you are using Apache as a web server, because we are using mod_rewrite.

Tags: , , ,

Tutorial : Change virtuemart to be at the front page of joomla

February 14th, 2010 | 2 Comments | Posted in PHP

I have just started using virtuemart extension of Joomla. I was wondering how am I gonna change the front page of Joomla to be virtuemart. In other words, when visiting the homepage I want to see the catalogue first. I’m too lazy to find a way to the catalogue.

1. Sing into the admin area,
2. Go to Menu > MainMenu
3. Unpublish the original “Home” menu item.
4. Click “New”
5. Select “Component” and choose “VirtueMart”
6. Be sure to name the new menu item “Home”, otherwise it will not work properly.

Note: Because Joomla considers “Home” as a homepage

Photoshop : Adjust white balance in PS in perfection

February 14th, 2010 | No Comments | Posted in Photoshop Techniques

Reference : http://9meo.multiply.com/journal/item/31

Apache : Enable mod_rewrite on MacOSX

February 2nd, 2010 | No Comments | Posted in Mac OSX

Reference http://www.deheus.net/petrik/blog/2005/02/11/getting-mod_rewrite-to-work-on-mac-os-x/

First go to /private/etc/apache2/httpd.conf
Remove # from

1
LoadModule rewrite_module     libexec/httpd/mod_rewrite.so

Second go to /private/etc/apache2/user/your-username.conf
Change AllowOverride None to AllowOverride all

Third restart the apache2

1
sudo /usr/sbin/apachectl restart

If you need to see the log of mod_rewrite in case that something bad happen just go back to /private/etc/apache2/user/you-username.conf

Add these lines

1
2
RewriteLog "/private/var/log/httpd/rewrite_log"  
RewriteLogLevel 9

How to display php error on the web page

February 2nd, 2010 | No Comments | Posted in PHP

Has anybody been curious about why my error on .php file is display on error_log in apache2? Why my error doesn’t print on the screen. So that I don’t have to go to the error_log and tail all the time. Or it’s just me. I am a total newbie in PHP and apache2.

Here’s the thing.

Put that code on top of your first php file and the scariest thing will appear on your screen

1
2
ini_set('display_errors', 1);
ini_set('log_errors', 1);