Posts filed under 'htaccess'

how I learn “.htaccess”

I must agree I learned a lot, while doing my code-igniter project named “CAIRNS Property Guide”. One of this learning is about HTACCESS. Previously I was scare about this word “.HTACCESS”. I always run away for this creepy name .HTACCESS. But, at a point I had to write some modification on HTACCESS file. Those who work with HTACCESS, they know, if some rules are written wrong, .htaccess file will never and ever work. Well, I also face this same problem. I do copy and paste some rules from net. And its showed error. So, by force I had to learn what’s .htaccess is and how can I make them working. Now, I want to share my knowledge with you. Of course what I will write about .htaccess file, that will collected from some books and some internet source. So, please don’t think I am going to publish new rules about .HTACCESS file: D. I am preparing my document about .HTACCESS file, for those who are interested to learn .htaccess quickly. Hope very soon I will about to publish it.

Add comment April 11, 2009

codeigniter -’secure, non-secure content’ pop up message in IE7

While doing my Project with Codeigniter I face a very disgusting problem. My developed site’s some pages are HTTPS, and other parts are HTTP. When I try to access the HTTPS page in IE it shows a pop up message telling

”This page content secure & non-secure content……!”

untitledIt was really very much annoying. I tried with many ways. After a lot of cost, I successfully solve this problem. Now, I want to share my words how you can you stop this irritating pop up message.

There are actullay two ways,

  1. Manually way: change the setting of your IE browser.
  2. Dynamic & efficient way:

Manual way you will find in google. So, don’t want to discuss about that. I am interested to share 2nd option. Because, manually changing the browser setting is not an proficient way and not a good solution. If you tell every visitor to change the setting, visitor will never back to your site. So, a good programmer will never do that.

Anyways, just come to the point. How can we solve this problem?

  • If there is any <iframe src=”"
    • Replace it to <iframe src=” javascript:void(0)”
  • If there is <link href=http://server_name.com/system/application/css/style.css
    • Replace it with <link href=https//server_name.com/system/application/css/style.css
  • If there is <script type=”text/javascript” src=”http://system/application/css/swfobject.js”></script>
    • Replace with <script type=”text/javascript” src=”https://server_name.com/system/application/css/swfobject.js”></script>

For codeigniter you will not able to write the URL directly. So, you have to take the “base url”  dynamically.  For all non-secure pages base_url will be HTTP. and for all encrypted page, base_url will be HTTPS.

Like: for encrypted pages, $base_url=https://server_name.com/ and

for non-secure pages, $base_url=http://server_name.com/

‘<?php echo $this->config->slash_item(  $base_url ); ?>

2 comments April 11, 2009


My Profile


# Software Eng. # Worked with C,C++, JAVA and PHP. #Love to play with codes. # Mostly like to do programming with 'C'. # I am not a CODER, but a DEVELOPER.

Admin Panel..

Life Cycle

November 2009
S S M T W T F
« Sep    
 123456
78910111213
14151617181920
21222324252627
282930  

Clouds

cakephp codeIgniter desktop htaccess jscript linux mixed my words php regular expression

Just Posted

TOP R@TED

TaGs

cakephp codeIgniter desktop GP htaccess image upload installation jscript linux news password Personal Life php regular_Xpression script session validation

Archives

Top Posts

CoMmEnTs

Blog Stats

My Web Links

Web Links

RSS Xperts.PHP