MARCH 10TH, 2010
By MOHAMMAD SAJJAD HOSSAIN
A few days back one of my project’s domain changed. The nature of this project was such that it provides URLs to it’s subscribers to use in their site for different purposes. As it has a huge user base, it was quite impossible to change the URLs already provided to the subscribers. That’s why I searched for a solution which will redirect the subscribers to new domain. I knew HTACCESS files can provide this type of service. So, I searched web for a solution to this problem – 301 redirection with HTACCESS file. Then I found the following solution. Before I provide the solution, I just want to say I am not an expert of HTACCESS
.
I have created .htaccess file with the following line to redirect any request to http://www.oldurl.com/ to https://www.newurl.com/.
redirect 301 / https://www.newurl.com/
The line stated above tells Apache server to redirect all request to http://www.oldurl.com/ will be redirected to https://www.newurl.com/using 301 permanent redirection. It worked fine.
After implementing the solution I faced another problem. The line of code was redirecting to only HTTPS irrespective of the request made to HTTP or HTTPS. This caused a problem for the pages which were non-secured, I mean shown via HTTP. These pages contain elements like CSS, JavaScript files, images etc. which are linked as HTTP. So, browsers started generating security warnings. Again I took help of Google and searched for a solution. After studying different problems I wrote the following lines of code in the .htaccess file and it worked.
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ https://www.newurl.com/$1 [L,R=301]
RewriteCond %{HTTPS} !^443
RewriteRule ^(.*)$ http://www.newurl.com/$1 [L,R=301]
The above code does a conditional redirection. If the request is made to HTTP then it redirects to HTTP and the same is for HTTPS.
FYI, my project is built with CodeIgniter and the redirection worked fine with it.
JULY 5TH, 2009
By MOHAMMAD SAJJAD HOSSAIN
Yesterday was my holiday. I thought that I will go for a movie. I heard Pink Panther 2 has been released in Dhaka. I went to Star Cineplex at Bashundhara City mall to get the timing. I haven’t gone there (Cineplex) before. I reached at 4:30pm and saw that a show was going to start at 5:15pm. Without thinking much I bought a ticket and went in to the hall. I found Star Cineplex is a very nice place to watch movie.
I enjoyed this movie very much. It was full of comedy. And the actors done a great job. From first to last I laughed. Though I found thrill not that much and the ending could be better, but I enjoyed comedy. I have seen many people went to see this movie may be for Aishwarya Rai as she was more focus on the posters at Cineplex. She looked aged, but acted as usual. Steve Martin’s acting is remarkable.
I think you should go and watch this movie. Laughter is the best medicine, and this type of films supplies this medicine
.
JUNE 22ND, 2009
By MOHAMMAD SAJJAD HOSSAIN
Yesterday, June 21 2009, I had to give a presentation on payment gateway integration at our office. That’s why I prepared a slide show. I mainly tried to show how PayPal’s Direct Payment API calls are made. I have choosen this because this technique is also used by other payment gateways. As I have shown the example based on PayPal, I called this session – “Integration of Payment Gateways, The PayPal Way“. It gives a basic idea how we can make API calls for payment processing. I have quoted some texts and images from PayPal’s integration documents.

You can download the presentation from here. For PDF version, click here.
JUNE 7TH, 2009
By MOHAMMAD SAJJAD HOSSAIN
Yesterday June 06, 2009 at 8:45pm our first child came to this world. Its a girl. Both mother and child are fine. Please pray for our new born.

Our daughter Safwana Hossain Saumya
MAY 30TH, 2009
By MOHAMMAD SAJJAD HOSSAIN
Many times this happens that in a page we have used a DHTML menu and a flash header and when we mouse over the menu, the menu could not be visible because of the flash object comes over the menu. Another situation could be – we used a block script and the page contains a flash object and when the script is called the flash object could not be hide.

I faced these situations many times and searched web for a solution. Long ago I found a solution which worked for me to solve these problems and I am still using it.
The solution
If you are using an object tag, then add the following param in it.
<param name="wmode" value="transparent" />
If you are using an embed tag, then use the following attribute in it.
I don’t know what these codes do
as I am not a flash expert, but they work. If anyone knows anything more about these codes then please share with us.
MAY 14TH, 2009
By MOHAMMAD SAJJAD HOSSAIN
I am a fan of FireBug for FireFox browser. It helps me solve my design issues and I can easily debug JavaScript codes. I know it can do many more, but I mainly use it for design issues. I was thinking if I had something like this for Internet Explorer! One day I googled to see if there is any solution. And amazingly I saw that there is a tool from Microsoft. I downloaded it and installed. If you want to compare it with FireBug, then it has very limited features. But as I said earlier my main need is solving design issues, I now use it for finding design issues in IE and found it very helpful.

From Microsoft site, here are current features of the tool.
- Explore and modify the document object model (DOM) of a Web page.
- Locate and select specific elements on a Web page through a variety of techniques.
- Selectively disable Internet Explorer settings.
- View HTML object class names, ID’s, and details such as link paths, tab index values, and access keys.
- Outline tables, table cells, images, or selected tags.
- Validate HTML, CSS, WAI, and RSS web feed links.
- Display image dimensions, file sizes, path information, and alternate (ALT) text.
- Immediately resize the browser window to a new resolution.
- Selectively clear the browser cache and saved cookies. Choose from all objects or those associated with a given domain.
- Display a fully featured design ruler to help accurately align and measure objects on your pages.
- Find the style rules used to set specific style values on an element.
- View the formatted and syntax colored source of HTML and CSS.
I don’t know why Microsoft is not releasing any new version of this tool. This tool was last released on 5/9/2007. Since then no new update has come. If you want to try this tool you may download it from here. And of course do not forget to share what you think about it.