Solved

mod rewrite / php question

Posted on 2013-12-29
4
377 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

777 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