WP-Admin Trailing Slash Problem

I had this WordPress wp-admin trailing slash problem for a couple of weeks now. When I don’t include a trailing slash after the wp-admin directory when logging in to WordPress, I will get a 404 missing page error. It’s a little annoying if you ask me, but it doesn’t really affect blog readers. It only shows up if you want to login to the WordPress Dashboard, and you forget to type the trailing slash at the end of wp-admin. Example below.

site.com/wp-admin/ <– this redirects to the WordPress login ok.
site.com/wp-admin <– this will result in a 404 missing page error.

So, I tried a couple of suggestions I found online, but the suggested changes to the .htaccess file didn’t seem to fix the issue. A couple of occasions, the suggestions were exactly the same code I already had in my .htaccess file. So, I tried a couple more suggestions. I noticed one blog post had a couple more lines in the .htaccess file that I haven’t seen in mine. So, I tried it and it worked. So, here are the changes I made.

I added these two lines to my .htaccess.

RewriteEngine On
RewriteBase /

I think the key code is in the second line. It basically establishes the base URL.

Facebook 40% Off IPO

Facebook (FB) went down 6% closing at $21.74 for the day. With today’s closing price, Facebook is now 40% off its original IPO price. I’m sure some poor souls got burned by that hype. I remember reading an article a couple days after the IPO when the stock began to slide, where one analyst priced FB at $13. At the time, I thought it was out of reach. I said no way FB would slide that low. Well, looking at the price currently, FB is not that far off. If Facebook stumbles this quarter, we might see the stock hovering around $13. Not a distant possibility at all.

Yahoo Mail Going Ape Crazy

I just tried checking my emails at Yahoo Mail, and it’s going ape crazy. It looks like the upgrade didn’t go over very well. That’s one thing the new CEO, Marissa Meyer needs to fix. Yahoo needs to have flawless execution when making upgrades, and especially to Yahoo Mail, where millions of users use it for business and personal reasons.

How many times do I have to accept the terms of service? Is five times enough? I hope Yahoo doesn’t lose my mail. That would be a disaster. This makes you think twice if you should rely on free email for your business. I wonder how many people really read Yahoo’s Terms of Service. I bet 99% of users don’t read it. I certainly didn’t.

Yahoo could have put anything in that agreement, and by law, I’m bound to it. I should really read it. You should, too. Come to think of it. It’s quite scary. I just love the fact, that you can check Twitter, if you’re not the only one having issues with something, because everyone and their mother is tweeting about it. Twitter, you’re awesome.

Google FIber Come To The Bay Area

Come to Fremont, why don’t you. I wished Google started their Google Fiber service here in the Bay Area instead of Kansas City. I would love to trade my AT&T DSL account for Google Fiber for an extra $20. I would not know what to do with all that speed, but I’m sure I wouldn’t be complaining that much.

The problem with my neighborhood is, we don’t have fiber anywhere close to the house. AT&T Uverse is not even available. I’ve inquired from AT&T many times, each time I hear, “I’m sorry sir, Uverse is not available in your neighborhood. We will let you know when it’s available in the future.” Yeah, yeah. Whatever.

I’m sure it’s going to be the same issue when Google Fiber rolls out in the Bay Area whenever that happens if ever. I wouldn’t hold my breath. Unless fiber is rolled out in my neighborhood, it wouldn’t really matter. Plus, I already made a pledge I wouldn’t use Comcast as long as I live, so my choices are quite limited.

Lucky Kansas.

Amazon Pushing For Internet Sales Tax

One of the biggest advantages of shopping online is avoiding sales tax. If you buy a product from a company that does not have a brick and mortar store in the state that you live in, you don’t have to pay sales taxes. That’s the advantage at the moment. It’s a considerable savings that can amount to as high as 10 percent of the purchase in some locations.

Recently, Amazon has been backing a bill that will allow states to collect taxes from online retailers. Amazon is perplexedly behind it, since from their point of view, the taxes doesn’t really affect them that much. The sales taxes collected will be shouldered by you and me, the online shoppers. So, why would Amazon risk this by shooting itself in the foot? Wouldn’t shoppers look for alternative ways to shop somewhere else other than Amazon?

Proponents of the legislation argue that this bill will level the playing field between brick and mortar and online companies. Point taken. On the other end, opponents are arguing, that online retailers will not really benefit from collecting out of state taxes. In addition, who wants to deal with 9000 tax codes across the United States. The bill does have an exemption to online sellers with less than $500,000 in remote sales. That’s the key. More about this later.

How will each individual state enforce taxes? Will they force online shoppers to state their online purchases on their returns? Does that work? Will people be honest enough to state their online purchases on their returns? Will states force online retailers, such as Amazon, to provide them tax information every year? It sounds like a much more complicated mess than it looks.

As I mentioned earlier, there are online stores that are exempted. Stores that have less than $500,000 in remote sales. The key will be finding smaller online stores that wouldn’t charge you sales taxes for your online purchases. Maybe, this would encourage would-be entrepreneurs to build smaller online stores.

Potentially, this could level the playing field to a field that politicians are already trying to level.

Oh Noes Twitter Is Down

I haven’t seen this from Twitter in a while. It looks like Twitter is having major issues. It’s the end of the world I tell you. First was Google Talk at 4am this morning. Now, it’s Twitter. What’s next? Just think of all those missed tweets. How can we have the Olympics with Twitter being down.

I think the Olympics broke it. Well, at least the blogs are up and running. So, where’s the fail whale? I miss that guy. Instead, we have this page that I was able to capture. Now, we know the real cause of the problem based on the explanation below.

For some <%= reason %> it’s down. Well, that explains it. When do we figure the service will be back on? Of course, it will be back on <%= deadline %>. Everybody knew that. Come on.

Changing Password Affects Google Talk

I recently changed my GMail password since I was changing passwords for all my other email accounts in light of the Yahoo password leak the other week. Little did I know, changing my GMail password also affected my Google Talk setup at Obihai.

A few months ago, I bought an analog terminal adapter (ATA) called the Obihai 110 from Amazon. This tiny little device allows me to configure my Google Talk number to the device and connect a regular analog phone to it.

The reason I choose Google Talk is, because it’s free. I can make phone calls to any cell or landline phone in the US and Canada for free. So, when I changed my GMail password, the Obihai setup with Google Talk got all screwed up as well.

Of course, I should have expected that. Somehow, I didn’t cross my mind until I realized I couldn’t dial out. I’m making a mental note. If I ever change my GMail password again, I need to head over to Obihai and update my Google Talk setup.

Regain Your WordPress Admin Account

So, I decided to get cute and changed my WordPress admin username to a username I wanted via a utility called phpMyAdmin. I went to the wp_users table and made a simple username change to the user_login field. I logged out and logged in back to the WordPress Dashboard. Disaster! I just lost both my WordPress admin and network admins rights. My former admin account has been reduced to a regular plebe. So, this is how a regular WordPress subscriber looks like.

It was a scary five minutes at WordPress land. I’m laughing now, but I wasn’t then. So, I went back to phpMyAdmin and also changed the user_nicename and display_name to the wp_users table hoping that would fix it. No cigar. Panic set in. After a few Google searches, I finally found the solution. Thanks to people who post their solutions online.

What a relief! First, you have to make sure you have the right user_id, especially if you have a multisite blog. Go to your wp_users table and make a mental note of your admin ID. It’s usually an ID of 1.

Next, I went to the wp_usermeta table and changed the wp_capabilities entry to a:1:{s:13:”administrator”;s:1:”1″;}.  The key here is the entry s:13. My account was reset to s:1 for some reason. I temporarily changed it to s:10, but it didn’t work. Setting it to s:13 did the trick. It worked wonderfully.

Now, I’ve regained all the admin rights for each blog that’s on the network, except that I’ve lost the Network Admin. Well, another Google search. Thank you. To make the story short, I also had to edit the wp_sitemeta table. Look for the meta_key and change to a:1:{i:0;s:11:”yournewname”;}. The s:11 is the length of “usernewname” which is 11.

That was the fix. Whew. A close shave. All in all, all is good once again at WordPress land. I am one happy admin. Just a bit on the adventurous side, but otherwise a happy camper. I’m posting this article because, I know some dufus admin in the future will probably do the same thing that I did. It wasn’t all that bad. It was just a little bit disconcerting when you lose all admin rights.

New Features of OS X Mountain Lion

What’s all the hype with OS X Mountain Lion? Will you upgrade to one for just a measly $30. That equates to about eight Starbux coffee drinks. That’s about a week’s worth of coffee to some people. If I can sum up all the new features in just a few words, they are: “iCloud, Notes, Reminders, iMessage, Notification Center, Power Nap, Dictation, Sharing, Facebook, Twitter, Airplay, Game Center, Gatekeeper, and Safari.” Got all that? All in all, over 200 new features.

If you have five minutes to spare, Apple just released this video at Youtube which goes over the new features of OS X Mountain Lion. Now the question is, will I upgrade to one? Yea, probably. Most likely. I just have to go for a week without any coffee. That’s a tougher task than I imagined.

Fail2Ban

Fail2ban is an intrusion prevention framework written in Python. It operates by monitoring logs and running certain scripts based on findings. A good example where Fail2ban is used, is when there are repeated failed password attempts to a SSH port. Typically, the offending host is locked out for a period of time.

Fail2ban is ideal when there’s a brute force attack on a server. It will slow down an attack since the blocked host is locked out for a period of time. Although, it prevents attack from a single host, it shortcoming is, it fails to protect against a distributed attack from a network of computers.

Fail2ban is generally used with firewall programs such as Iptables, which are available on most Linux based servers. Fail2ban updates the firewalls rules when successive failed attempts occur on the system, therefore locking out the remote host for a certain period of time.

To install Fail2ban on Ubuntu or Debian from the Terminal:

sudo apt-get install fail2ban

You can edit the config file to update the settings. For example, you can increase the bantime from 600 to 1200 seconds. Or you can increase maxretry from 3 to 6.

sudo nano /etc/fail2ban/jail.conf