Home » Archive

Articles Archive for March 2008

  Posted: Mar 27 | Filed under: Wordpress

HowTo enable/disable wordpress comments via PHPMyAdmin:

Enable:

UPDATE wp_posts SET comment_status = ‘open’, ping_status = ‘open’ WHERE comment_status = ‘closed’;

Disable:

UPDATE wp_posts SET comment_status = ‘closed’, ping_status = ‘closed’ WHERE comment_status = ‘open’;


  Posted: Mar 21 | Filed under: ModRewrite

Due to SEO aspects many webmasters rewrite all their “www” queries to “non-www” queries. Why that ? Simply because search engines might think there is duplicate content if they can access www.yourdomain.com and http://yourdomain.com at the same time.

That’s why you should rewrite www to non-www or vice versa permanently.

Here is the simple solution for that:

RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^yourdomain\.com
RewriteRule (.*) http://yourdomain.com/$1 [R=301,L]

Personally I think the shorter the better, but it’s different for each target group. Older people sometimes think that you have to type www in front of any domain name. This is completely up to you! Enjoy rewriting :)