|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Search Engine Optimization Forum SEO is much easier with help from peers and experts! The WebProWorld SEO forum is for the discussion and exploration of various search engine optimization topics. Any non (engine) specific SEO or SEM topics should go here. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I have to change my sites url from http:// to https. There are few queries in my mind:
|
|
|||
|
View this thread.
|
|
|||
|
Vinay, supposedly your site is the same if it's http or https. We have a site, spauno.com, which is all secure. Save the index file as php and add this code at the beginning:
<? if(!isset($HTTP_SERVER_VARS[HTTPS])) { $FULL_URL = "https://".$SERVER_NAME.$PHP_SELF; header("Location: $FULL_URL"); } ?> There is no difference if you type http://www.spauno.com/anypage.htm or https://www.spauno.com/anypage.htm, it will always take you to https. Don't use absolute URLs in the programming because you'll have the problems you were asking about. The correct thing is to secure only a few pages in the site, like your contact form and such. If you are interested in doing this, I can send you the code in a while. We actually have to make the change for spauno because https is slower and we don't want all the site to be slow. |
|
|||
|
THanks all of you for your response.
@ webmax YEs sure please send me the code soon !!! |
|
|||
|
Vinay,
The code I gave you yesterday works for securing the entire site under https. Yesterday our site was all secure, but today it has a new code in the index file, and I'm not totally sure that it's necessary any more: <? if(isset($HTTP_SERVER_VARS[HTTPS])) { $FULL_URL = "http://".$SERVER_NAME.$PHP_SELF; header("Location: $FULL_URL"); } ?> That means that only certain pages will be secured. The chosen pages have this at the beginning (maybe it works using just this, with no server markup on the index): <? include("class/DataBase.php"); if(!isset($HTTP_SERVER_VARS[HTTPS])) { $newurl = "https://www.spauno.com/form/paso_1.php"; header("location: $newurl"); if(!isset($HTTP_SERVER_VARS[HTTPS])) } ?> The file paso_1.php is the one being secured. There are other secure files, all php. However, if you visit an ordinary file that does not have server markup (for example Massage Experiences) AFTER you have visited a secure one, it stays in https mode. It shouldn't and I don't know why. Maybe it's because of the php code on the index file... I'll play with it on Monday and let you know what happened. Does someone else have any suggestions on how to fix this? |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| i want to change all http to https, is it ok? | AjiNIMC | Search Engine Optimization Forum | 4 | 07-29-2006 10:51 PM |
| HTTP vs HTTPS | amar | Google Discussion Forum | 4 | 06-14-2006 01:54 AM |
| http:// and https:// Problem | richkoi | Internet Security Discussion Forum | 15 | 04-24-2006 07:44 PM |
| Will https: secure site create issue for SEO??? | etechraj | Search Engine Optimization Forum | 1 | 09-21-2004 10:23 AM |
| HTTP vs HTTPS speed | computergenius | IT Discussion Forum | 1 | 04-16-2004 11:33 AM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |