Powered by Cellfex RSS Follow me on Spotify

Archive for May, 2011

There are some issues when using www domains with non-www domains (like javascript initialization which results in cross-domain incompatability when www.domain.com is understood as something else than domain.com).

Anyway, www is soooo ’90.

To get rid of www and transfer customers to non-www without rewriting your html/php files just put a .htaccess rewrite rule:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
19 May 2011

Htaccess www-domain to non-www domain redirect

Author: Edgars | Filed under: Web Development, htaccess

If you don’t want to use vi (what is it for anyway?), you can change default browser on console by:

export EDITOR=”nano” (or whatever you like)

10 May 2011

change default editor in console

Author: Edgars | Filed under: serversandstuff

While setting up cronjob for php script got (dont forget to php -l you r script btw) unexpected “<b>Parse error</b>:  syntax error, unexpected T_OBJECT_OPERATOR”

D’oh. appearantly CLI for PHP is not always php5. beware.

10 May 2011

Oh this unexpected T_OBJECT_OPERATOR

Author: Edgars | Filed under: DailyStuff, php, serversandstuff