Monthly Archives: June 2007

WordPress and osCommerce

Anyone out there who runs a WordPress site and an osCommerce store will most likely have come across this problem. Let’s say WP is your site’s CMS under http://mydomain.com/ and your osCommerce installation is under http://mydomain.com/catalog/. If you try to access /catalog/admin/ in your browser, you might be greeted by a WordPress 404 page, blocking you from accessing the administrator page. The temporary fix for this solution would be to simply remove/rename the .htaccess file under /catalog/admin/ and login to the administrator section. This is highly annoying and poses a security risk: what if you forget to put the .htaccess file back?

After looking around the web for an answer, I found this solution. In your /catalog/admin/.htaccess file, put the following:

ErrorDocument 401 /[path_to_file]/myerror.html
ErrorDocument 403 /[path_to_file]/myerror.html

Once inserted, create a “myerror.html” file in a directory of your choice (let’s say in the root of http://mydomain.com/) and customize the page with a 401/403 message if you wish. That’s all there is to it!

I found this solution from this page. Their explanation is, and I quote: “HTTP Basic-Auth first sends 401 Unauthorized to request a password from the browser. The webserver tries to serve the corresponding, specified Errordocument. However when the ErrorDocument directive of your webserver is set wrongly, i.e. points to a non-existent file, [WordPress] ends up handling the page-request.”

Cuba 2007

Last week, I came back from Varadero, Cuba. I went with 8 other friends and had a blast. This is the fourth time I visit Cuba and only the second time where I got to experience its nightlife. Now, by all means, Varadero’s nightlive does not compare to Montreal, but it’s still an entertaining scene. I have to admit, I felt mentally and physically refreshed after I came back from the trip. I managed to get some work done and my stress levels have dropped tremendously. I wish I could do this every 6 months!

During the day, my time was spent on the beach. Actually, most of it was spent in the ocean and getting a nice tan on the face. The Cuban beach and ocean do wonders to the body. I notice all my cuticles had disappeared and my nails were super clean. Not that I manicure my nails, but having nice hands like that really do catch the eye.

At night, it was all party (mostly drinking). Some of the clubs we visited included The Pirate’s Cave, The Beach Club/Bar, and International (or Continental) . The first two clubs were fantastic, the first one literally being held in a freshly cooled cave. The second bar was an outdoor (but covered) terrass next to the wonderful Cuban beach. The third club, however, was a flop as there was no air conditioning and the place was packed to the max. The wait times at the bar was also a total disaster: it took me about 15 minutes to purchase a rum and coke! I have to say, I had a lot of fun simply hanging out at the local hotel bar with my buddies and drinking the night away (with some nice Cuban cigars being smoked too). I look forward to those nights everyday now after coming home.