Solved

mod rewrite / php question

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

Expert Comment

by:Dave Baldwin
Comment Utility
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 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 200 total points
Comment Utility
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
Comment Utility
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 82

Expert Comment

by:Dave Baldwin
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

772 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

12 Experts available now in Live!

Get 1:1 Help Now