Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

mod rewrite / php question

Posted on 2013-12-29
4
Medium Priority
?
399 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 84

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 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 800 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 1200 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 84

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

664 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