Posts under Linux

How to avoid duplicate content using .htaccess

advertisement

htaccessIf domain.com and www.domain.com has same content, Google will think it as duplicate content. However, you can use .htaccess to avoid duplicate content. Solution is to redirect your visitor to one of the domain, either with www or without www. The trick below is a simple yet effective way to avoid duplicate content on the same domain.

To avoid duplicate content using.htaccess, follow the steps below:-

Continue reading How to avoid duplicate content using .htaccess »

How to show line number in vi / vim editor

advertisement

linuxA note for myself on how to show line number in vi. Always need to edit my code in vi mode, but my vi doenst show line number by default. and i always look for the command to show line number in vi. This is very inefficient. So i decided to made this post to remind myself on how the command to show line number in vi editor.
show line number vi, vi show line no, vi line number

To show line number in vi editor, follow the steps below:-

Continue reading How to show line number in vi / vim editor »

How to reload .bash_profile in Linux or Mac?

advertisement

linuxWhenever i add sth in .bash_profile, i’ll re-login to make sure the new .bash_profile is reloaded. Actually there is a command to reload the .bash_profile, n there is no need to re-login for the reload. And you know what? Re-login is a very stupid way (ya i’m stupid in for quite some time :p)

To reload .bash_profile, follow the steps below:-

Continue reading How to reload .bash_profile in Linux or Mac? »