<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dream House &#187; Tips &amp; Tricks</title>
	<atom:link href="http://sajjadhossain.com/category/tips-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://sajjadhossain.com</link>
	<description>Courage to do something...</description>
	<lastBuildDate>Wed, 10 Mar 2010 05:55:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>301 (Permanent) redirection using .htaccess file</title>
		<link>http://sajjadhossain.com/2010/03/10/301-permanent-redirection-using-htaccess-file/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://sajjadhossain.com/2010/03/10/301-permanent-redirection-using-htaccess-file/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 05:55:23 +0000</pubDate>
		<dc:creator>Mohammad Sajjad Hossain</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://sajjadhossain.com/?p=229</guid>
		<description><![CDATA[A few days back one of my project&#8217;s domain changed. The nature of this project was such that it provides URLs to it&#8217;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&#8217;s why I [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://sajjadhossain.com/wp-content/uploads/2010/03/301_htaccess_redirect.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignleft size-full wp-image-234" title="301_htaccess_redirect" src="http://sajjadhossain.com/wp-content/uploads/2010/03/301_htaccess_redirect.png" alt="301 redirection with .htaccess" width="220" height="300" /></a>A few days back one of my project&#8217;s domain changed. The nature of this project was such that it provides URLs to it&#8217;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&#8217;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 &#8211; 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 <img src='http://sajjadhossain.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="301 (Permanent) redirection using .htaccess file" />  .</p>
<p>I have created .htaccess file with the following line to redirect any request to http://www.oldurl.com/ to https://www.newurl.com/.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">redirect 301 / https://www.newurl.com/</pre></div></div>

<p>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.</p>
<p>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.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">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]</pre></div></div>

<p>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.</p>
<p>FYI, my project is built with CodeIgniter and the redirection worked fine with it.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fsajjadhossain.com%2F2010%2F03%2F10%2F301-permanent-redirection-using-htaccess-file%2F&amp;linkname=301%20%28Permanent%29%20redirection%20using%20.htaccess%20file"><img src="http://sajjadhossain.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://sajjadhossain.com/2010/03/10/301-permanent-redirection-using-htaccess-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Integration of Payment Gateways</title>
		<link>http://sajjadhossain.com/2009/06/22/integration-of-payment-gateways/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://sajjadhossain.com/2009/06/22/integration-of-payment-gateways/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 05:39:43 +0000</pubDate>
		<dc:creator>Mohammad Sajjad Hossain</dc:creator>
				<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[payment gateway]]></category>
		<category><![CDATA[paypal]]></category>

		<guid isPermaLink="false">http://sajjadhossain.com/?p=183</guid>
		<description><![CDATA[Yesterday, June 21 2009, I had to give a presentation on payment gateway integration at our office. That&#8217;s why I prepared a slide show. I mainly tried to show how PayPal&#8217;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 [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Yesterday, June 21 2009, I had to give a presentation on payment gateway integration at our office. That&#8217;s why I prepared a slide show. I mainly tried to show how PayPal&#8217;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 &#8211; &#8220;<a href="http://sajjadhossain.com/wp-content/uploads/2009/06/Integration-of-Payment-Gateways.rar#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Integration of Payment Gateways, The PayPal Way</a>&#8220;. It gives a basic idea how we can make API calls for payment processing. I have quoted some texts and images from PayPal&#8217;s integration documents.</p>
<p><a title="Integration of Payment Gateways" href="http://sajjadhossain.com/wp-content/uploads/2009/06/Integration-of-Payment-Gateways.rar#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="aligncenter size-full wp-image-185" title="Integration-of-Payment-Gateways" src="http://sajjadhossain.com/wp-content/uploads/2009/06/Integration-of-Payment-Gateways.jpg" border="0" alt="Integration of Payment Gateways Integration of Payment Gateways" width="500" height="375" /></a></p>
<p>You can download the presentation from <a title="Integration of Payment Gateways" href="http://sajjadhossain.com/wp-content/uploads/2009/06/Integration-of-Payment-Gateways.rar#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">here</a>. For PDF version, click <a title="Integration of Payment Gateways" href="http://sajjadhossain.com/wp-content/uploads/2009/06/Integration-of-Payment-Gateways.pdf.rar#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">here</a>.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fsajjadhossain.com%2F2009%2F06%2F22%2Fintegration-of-payment-gateways%2F&amp;linkname=Integration%20of%20Payment%20Gateways"><img src="http://sajjadhossain.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://sajjadhossain.com/2009/06/22/integration-of-payment-gateways/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What to do to put an HTML element on top of a Flash object</title>
		<link>http://sajjadhossain.com/2009/05/30/what-to-do-to-put-an-html-element-on-top-of-a-flash-object/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://sajjadhossain.com/2009/05/30/what-to-do-to-put-an-html-element-on-top-of-a-flash-object/#comments</comments>
		<pubDate>Sat, 30 May 2009 14:51:38 +0000</pubDate>
		<dc:creator>Mohammad Sajjad Hossain</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://sajjadhossain.com/?p=172</guid>
		<description><![CDATA[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 &#8211; we used a block script and the page contains a [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>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 &#8211; 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.<br />
<img class="aligncenter size-full wp-image-173" title="dhtml_flash_problem" src="http://sajjadhossain.com/wp-content/uploads/2009/05/dhtml_flash_problem.gif" alt="dhtml flash problem What to do to put an HTML element on top of a Flash object" width="488" height="297" /><br />
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.</p>
<p><strong>The solution</strong></p>
<p>If you are using an <code>object</code> tag, then add the following param in it.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; /&gt;</pre></div></div>

<p>If you are using an <code>embed</code> tag, then use the following attribute in it.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">wmode=&quot;transparent&quot;</pre></div></div>

<p>I don&#8217;t know what these codes do <img src='http://sajjadhossain.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="What to do to put an HTML element on top of a Flash object" />  as I am not a flash expert, but they work. If anyone knows anything more about these codes then please share with us.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fsajjadhossain.com%2F2009%2F05%2F30%2Fwhat-to-do-to-put-an-html-element-on-top-of-a-flash-object%2F&amp;linkname=What%20to%20do%20to%20put%20an%20HTML%20element%20on%20top%20of%20a%20Flash%20object"><img src="http://sajjadhossain.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://sajjadhossain.com/2009/05/30/what-to-do-to-put-an-html-element-on-top-of-a-flash-object/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
