PHP - Forwarding Ssl Domain To Another Ssl Domain, While Removing Ssl On The First One
I have two domains both running SSL. Let's call them old-domain and new-domain. old-domain is permanently redirecting traffic to new-domain. There are still a lot of links out there to old-domain with https://. If I were to remove SSL from old-domain but keep SSL on new-domain, I am betting that users will be getting some sort of certificate error. Right? Any way around that if I want to remove SSL from old-domain?
Similar TutorialsI have a client, that wants an affiliate driven service, which is fine. However they want to offer the affiliates the ability to forward there own domains to the service and have that work as the initial affiliate id token. Now my question is. I know I can find what the domain is that the scripts I am writing run off of using $_SERVER['HTTP_HOST'] however I'm not to sure how that would work for a domain that is forwarded with a 301 or 302 redirect status and masked for use on the service I am building up. I want to say I could use $_SERVER['HTTP_REFERER']. But as I said I'm not to sure how thats going to work for a forwarded domain thats masked as its not part of the actual host conf files its landing on in the end. Hopefully I am making sense with the above. So what would be my best choice of options to work with when handling a domain that will be masked and landing on another domain as it will be forwarded. I am only taking the inital landing with a domain and setting the tokens I need set for it to run as that affiliate and setting them in sessions and cookie and various other variables. But I guess I am just wondering which would be better for me to catch that inital landing with the domain thats forwarded. This topic has been moved to the corner of 3rd Avenue and mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=359430.0 I was wondering if anyone knew of a good way to query domain name availability with php? I know how to get an ip adress from a domain by using gethostbyname(), but I wanted to know if it was possible to get the domain name from the ip address. As in a website address (example.com) has a ip address of xxx.xx.xxx.xxx What I am trying to do is to get the 'example.com' domain name from the ip address. Is this at all possible, if so, how can it be done? Thanks in advance for any that helps out. Hi, I am trying to see if the domain name in the string is in an array. eg; Code: [Select] mystring='http://google.com/somethingelse'; myarray[]='google.com'; myarray[]='anotherdomain.com'; in this case return TRUE Code: [Select] mystring='http://phpfreaks.com/adir'; myarray[]='google.com'; myarray[]='anotherdomain.com'; in this case return FALSE How would I do this? Thanks, -mme Hello everyone, I have a site where the folders are set up in this arrangement: Code: [Select] _ ClientsFolder - client1 - | page-folder - pages are here (index.php) | | image-folder - images here | |_include-folder - style.css and database connections here _ client2 - | page-folder - pages are here (index.php) | | image-folder - images here | |_include-folder - style.css and database connections here PageIncludeFolder - include pages here (index.inc.php) The reason my folders are set up this way is because multiple clients will be using my site, but each client will have a customized sub-domain, yet all the code on the pages will be the same. All of the pages for the clients site are placed in ClientsFolder/client1/page-folder. Each page in this folder is a page that simply includes an entire page from the PageIncludeFolder. For example: ClientsFolder/client1/page-folder/index.php and ClientsFolder/client2/page-folder/index.php are exactly the same, file, which simply has the following code: Code: [Select] <?php include("../../../PageIncludeFolder/index.inc.php"); ?>The reason for this is so that I can easily modify all the client sites by only modifying the files that are in the PageIncludeFolder. (Trying to work smarter, not harder!) The images, style.css, and script.js files are called from the index.inc.php, which is included on the index.php page. For example, style.css is located at ClientsFolder/client1/page-folder/include-folder/style.css. So to link to the .css file, I have the following code in the index.inc.php file: Code: [Select] <link href="../include-folder/style.css" rel="sytlesheet" type="text/css" /> And images are linked using code similar to this: Code: [Select] <img src="../image-folder/image.jpg" /> Now, when I visit the index.php page by entering the entire url (http://www.mysite.com/ClientsFolder/client1/page-folder/index.php) everything works perfectly. However, as I stated, each client is being set up with a sub-domain. Client 1 has the sub-domain of http://client1/mysite.com, which is pointed to http://www.mysite.com/ClientsFolder/client1/page-folder/index.php. When I try to visit client 1's site using the sub-domain, the index.inc.php page is included perfectly, but the images and the style.css files are not being linked. I know this is kind of confusing, but as you can probably tell, I have spent many, many hours putting this together and now I need help to figure out what is wrong and why certain files are not linking properly ONLY when the page is visited using the sub-domain. ANY help or suggestions are GREATLY appreciated! Thanks everyone! Hi I have written a server session on login in the main domain and am trying to read it when they are sent to their sub domain. Unfortunately it won't read the session. I have searched for a solution, which points to altering the php ini. Is there another option that anyone knows about. Thanks I have a website on wordpress, at first it was on a friends server, but he switched it so its on bluehost. The website URL is an IP address with a slash and a name. However, I registered a domain name at godaddy. I was able to change the nameservers so that the URL of the index page of my website was changed to the domain name, however, when I click onto any other page from that page, it goes back to the IP address URL. What can I do? Thanks. Hello I am curious if it is even possible to get the domain when using iframes/frames? eg. domain2 shows a file from domain1 in an iframe. Can domain1 grab domain name "domian2"? I have two questions: 1. Is it the best way to get the domain of a url by parse_url? or preg_match or str_replace can be better alternatives? 2. What is the best way to remove www from the domains? Note that the domain name itself may contain www too (like www.1www.com) Thank for your attention This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=359139.0 I'm sorry if this is in the wrong section. I'm working on coding a page that will pull data from a servlet that's already been coded. Right now I'm just trying to get it to pull and display any information. The developer who coded the servlet says it works on his server and I'd rather not badger him with questions. Any help you can provide would be greatly appreciated. So I am running Wampserver 2.5 a basic installation as I have not changed any settings and my HTML page is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd"> i want to get all the domain name on the internet and put them into a database. is there a way to get this. hey guys im making a script where the user gets redirected...but im wanting to make sure the redirection is within the same domain and not being shipped off to another site when using ($_SERVER['HTTP_REFERER'])
now what im using seems to do the trick but im wondering if there is a better method of doing this?...i dont want to use regex either
thank you guys
<?php $match = strpos("http://127.0.0.1/login", $_SERVER['SERVER_NAME']); if ($match && $match > 0 || $match === 0) { echo "domain match"; } ?> Hi I operate (example) www.joebloggs.com which is using PHP sessions to handle Logins, etc etc. I also operate a separate site at www.joebloggs.com/NewSite which is entirely seperate from the site at www.joebloggs.com, even though there operating on the same Domain and Server. My problem is, when a user logs out of www.joebloggs.com (Using session_destroy), it also destroys any session information associated with www.joebloggs.com/NewSite. Is there any way to prevent this happening or am I going to have to rethink how I handle my sessions? Scouring the internet (Ive quoted below) I think somebody mentioned using session_name() but I fail to see how it would be implemented? Quote To avoid problems with sessions you should use the session_name('myapplication') [ session_name({UNIQUE_APP_ID}) ]. The problem you are mentioning can occur in more simple situations where there is an administration panel and a sign-in form for the users of the web site. If session_name is not used a signed-in user could have access to the admin. panel but this depends on the auth. scheme and mechanism you have implemented. Hi there, I am working on a website which has a sub-domain set as a folder and not an actual sub-domain (as my client does not want to do this which is another story). Anyway, all of my links which relate to the DOCUMENT_ROOT are not working. Example below: www.website.com www.website.com/admin - my sub-domain in a folder I can access a page within www.website.com/admin however all links to files, css files etc will not work because the DOCUMENT_ROOT does not inlcude the /admin/. My question is therefore is there some way of adding in this /admin/ step or fooling php/apache to include this in all files within the /admin/ folder. Many thanks Sim This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=353448.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=315341.0 $msg = "testing message"; $to = "$email"; $subjects = "testing"; $mailheaders = "From : singapore \n"; mail($to, $subjects, $msg, $mailheaders); Received in the email From : server name Question is I need it to receive as my domain name (FROM). Not the server name (FROM). |