Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

From HTTP to HTTPS

Status
Not open for further replies.

tijerina

Vendor
Joined
Mar 4, 2003
Messages
132
Location
US
I recently installed an SSL cert to my website.

When users type in the broswer shows this isn't protected via SSL. I am not sure where to do this or what file to manipulate, but my goal is: when a user types in on their browser: it will take them to How do I add an "S" to the end of HTTP? What file do I manipulate or can it be done?

Hope this made sense.

Thanks.
 
Thanks for the info.

You are correct, this is for php.

I see that the "header" option will work for me, it will redirect the http to an https.

--Still have a question----

Do I create a file called header and create the code for the redirection? Where would the "header" file reside, what directory?
 
header" is not a file -- it is a PHP built-in function.

Notice in my earlier post that the word "header" is a link that will take you to the PHP online documentation.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
sleipnir214

You have assisted me in the past and others as well (and I do thank you for that), but you sure have a way of making people feel really crappy about their questions.

YES I read your link and still it doesn't make sense to me, thats the reason for the second question.

I don't get it! How do I access the header utility.

What the best questions? Be nice.
 
tijerina:
Frankly, making you feel good about yourself is not in my job description.

Your question is either very badly phrased or it indicates a profound ignorance of basic programming concepts.

header() is a PHP builtin function, just like print(), echo(), array(), explode() and hundreds of others. You access the functionality of header() exactly the same way you do any other function -- by mentioning the function in your code, passing that function a value.

I've given you a link to the PHP manual. I've given you an example of invocation of the function.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
What ever. Nobody will ever be as good as you are.

"Frankly, making you feel good about yourself is not in my job description." I expected better than that! And to top it off, you choose the opposite. I have read your responses to people and you are not nice.

And for you to choose the word "ignorance", just proves what type of programmer you are.

You are a na, na, na I know more than you type of programmer.

Well, carry on with your I know more attitude and please do not post to my questions.

If everybody was like you, then their wouldn't be a good site like tek-tips...



 
tijerina:
Do you want to get your question answered, or do you want to go off on an ad hominem attack tangent?

If the former, explain in greater depth what it is you do not know how to do.

If the latter, I recommend you discontinue posting in this site.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
It takes two to tango..I don't see you stopping the replies.

The original question was very understandable, I am not sure where you are confused on that matter.

I am not sure how to start on this "header" path, I am new to php.

That's all that was... No more no less.


Happy Programming.

 
Yes, but my reply had a purpose to continue this thread. This verbiage:

tijerina said:
What ever. Nobody will ever be as good as you are.

"Frankly, making you feel good about yourself is not in my job description." I expected better than that! And to top it off, you choose the opposite. I have read your responses to people and you are not nice.

And for you to choose the word "ignorance", just proves what type of programmer you are.

You are a na, na, na I know more than you type of programmer.

Well, carry on with your I know more attitude and please do not post to my questions.

If everybody was like you, then their wouldn't be a good site like tek-tips...

Was nothing more than a badly-organized, petulant ad hominem attack.


You invoke header() exactly the same way you invoke print(), echo() or any other PHP function. There's nothing special about the function other than the fact that since it modifies headers, it must be invoked at a point in your script before your script has produced any output.

The simplest example of the use of a header is in my first post in this thread. The only thing that makes it an incomplete script is the presense of the "<?php"..."?>" tags:

Code:
<?php
header ("Location: [URL unfurl="true"]https://www.mysite.com");[/URL]
?>

If you have the above script as a file on our web server, say as foo.php, and you point your web browser to then you will instantly find your browser pointing to


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Thank you very much for your assistance, it was truly appreciated.

 
Jesus what a pair of weans!
Code:
</php
header("Location: [URL unfurl="true"]https://www.myserver.com/");[/URL] exit;
?>
add that on its own to in a file called index.php ensuring that index.php is configured as one of the valid index docs and it will redirect you there! ok?
 
Thank you Moonspell, I do appreciate your help.

You wrote: "Jesus what a pair of weans!" I am not sure what "weans" is, but I am sure I know what you wanted to say.

I agree with that statement regarding this thread..
 
As i am Scottish i suppose i should explain. a 'wean' is a small child. I actually was posted the reply and only then noticed that the solution had been given. think i got bored so skipped to the end and put up 'a' solution
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top