Solved

mod rewrite / php question

Posted on 2013-12-29
4
374 Views
Last Modified: 2013-12-29
I am using mod rewrite to force all SSL on all my pages.   My question is I have some php that I do not know the proper ways to handle the url now.  It works the way it is I just did not know if that is correct.

Do I leave this as http or do I change it to https

$logo_info = getimagesize("http://www.prizemagnet.com".$logo);

Open in new window


This is the mod rewrite I am using to force the SSL.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]

Open in new window

0
Comment
Question by:Luey
  • 3
4 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39745407
If you remove the 'http', it will use the current method, whether it is 'http' or 'https'.  Something I learned recently.  Like this.
$logo_info = getimagesize("//www.prizemagnet.com".$logo); 

Open in new window

0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 200 total points
ID: 39745409
Although... you are better off if you can access the file as a local file instead of using 'http(s)' because it is generally quicker.  It goes directly to the file system instead of through the network.  I think...

http://www.php.net/manual/en/function.getimagesize.php
0
 
LVL 58

Accepted Solution

by:
Gary earned 300 total points
ID: 39745426
Since it is a separate connection from the one from the browser it has no bearing on that SSL connection, so carry on with http
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39745455
Actually Gary is right, I was still thinking it was in the browser.  But you are still better off if you can access it as a local file.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now