Thursday, November 25, 2010

GoDaddy Coupons

I tried YUP749 and it worked for me! Applied at the very last step, when you are reviewing your shopping card before the final confirmation. Look for "coupon" field at the top right of checkout page.

Good deal, particularly if you are buying 5- or 10- year domains.

FAN3 – 35% off domains Most popular.
FAN749 – 50% off .ORG domains
YUP749 – $7.49 .NET domains
FED749 – $7.49 .BIZ domains

GAM1 – 10% off any order
MIN15 – 15% off any order of $75 or more

GAM2 – $5 off any order $30 or more
FANOFF – $10 off any order $40 or more

PETS20 – 20% off hosting plans of 1yr or more
GAM1 – 10% off month to month hosting
AUCTION12 – 50% off godaddy auction account
FANSSL – 56% off godaddy ssl account ($30 account for $12.99)

Monday, November 22, 2010

How to remove categories slugs in WordPress

WordPress adds default category slug to your blog URLs, so a URL to your category page looks like myblog.org/category/receipts/

You can replace 'category' word with whatever you want, e.g. with 'food', so you'll get
myblog.org/food/receipts/
Better, but still not ideal - what if your blog is not about food only?

Surprisingly, if you completely remove the categories slug in Settings->Permalinks, leaving the field there empty, WP will restore the default 'category' slug back.

I want my categories URLs to look clean -
myblog.org/receipts/
It's better for humans and SEO (these two typically come together).
WP has no option for that, but there is a nice plugin:
WP No Category Base

Simply install it. No configuration required.
Voila! Here are you go: http://photocoupon.net/camera/

Saturday, November 13, 2010

Wordpress with HTTPS/SSL on a custom port

I wasted a few hours trying to configure Wordpress to run on a non-default (not 443) SLL port. Well, it looks it is impossible due to how the WP code is written. Switching from HTTP to HTTPS just replaces the 'http://' URL part with 'https://' part and the port is ignored. The developers assumed that SSL is always on port 443, which obviously can be a huge problem if you are willing to run a few WP with SLL on the same machine.

Playing with .htaccess can not do the trick either. At least I did not found how to do that.

Thursday, November 04, 2010

FULLTEXT search in MySQL DB does not return any result, but works fine in BOOLEAN mode

Well, that was a trap... First, I found that a simple query like
SELECT * FROM `articles` WHERE MATCH(title) AGAINST('jerusalem')
returns 0 rows on my development DB.
Next, I found that the same Native Language SQL query works just fine on the production DB with the real data.
Third, I discovered that the same query works just fine on both DBs when BOOLEAN search is used:
SELECT * FROM `articles` WHERE MATCH(title) AGAINST('jerusalem' IN BOOLEAN MODE)

The reason was that I got only two records in my development DB! So any Natural Language search failed there into the 50% 'common keywords' rule stated in MySQL manual:
A natural language search interprets the search string as a phrase in natural human language (a phrase in free text). There are no special operators. The stopword list applies. In addition, words that are present in 50% or more of the rows are considered common and do not match. Full-text searches are natural language searches if no modifier is given.

With just two rows any keyword was considered by MySQL as common! The obvious solution was adding one more empty row. And voila! - we got the search results.

It looks like this 50% rule can not be switched off by MySQL configuration. If you know how to switch it off drop me a note, would love to do that in my development environment.