Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

mod rewrite / php question

Posted on 2013-12-29
4
Medium Priority
?
407 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 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

824 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