HTML - Switching Between Http: And Https: Using Relative Addresses
Probably a simple problem, but I can't figure out how to do it. I am designing a site where some of the pages need to be secured via SSL and some don't. I would like to switch between the secure and non-secure pages, but I would like to do it with relative links.
In other words, on a non-secure page, say aaa.com/index.html, I would like to do <a href="https://aaa.com/secure.html">Go to secure page</a> but I'd like to do it with a relative page reference to hide the overall structu <a href="https:secure.html">Go to secure page</a> only that doesn't seem to work. Ditto for going from pages handled with https: to http: . Am I missing something stupidly simple to make this work or do I have to give the fully qualified link all the time? Thanks! Similar TutorialsJust out of curiosity, if a server returns a page with code 3xx and a "Location: url_1" header, but also includes a <meta http-equiv="refresh" content="0;url=url_2"/> tag, then would the browser be expected to redirect to url_1 or url_2? Sorry if this is the wrong section. Hello, I'm not sure where else to turn with this question, so I apologize if it's not forum-related. I need to add a link to an HTML doc that would open that same page in a new "printer-friendly" pop-up window. The problem is that the address of that page would always be different because it is being generated on the fly by users doing a search through our database of keyworded photos. An example of this address would be: http://ourwebaddress/netpub/server.n...here&template= results.np&field=Keywords&op=matches&value=Dallas&value=brownstone&field2=Keywords&op2= matches&search=View+Your+Search+Results This address shows images based on my search for "Dallas" and "brownstone," and because this address would change with every new search it's useless as a permanent link. Is there an HREF link command (or perhaps something else) that would simply open the existing page in a new window, no matter what the page's current HTTP address is? Any insight with this would be very appreciated! Many Thanks! Well I'm working on a website and Im trying to figure out if its possible to cycle background images in HTML. To have multiple images in on folder and each time a user logs in just randomly pick one of the 5 or so automatically so they have a different view each time... Not even sure this is possible. Thanks Hi yall! OK I've worked on some websites before, and I manage my own website, but most of the time I just work on informational parts of websites, nothing too fancy. I'm more inclined to the graphic design part of it. We just purchased a security certificate and it covers the entire site. Basically if I want one of the pages to utilize the secure server, I have to use some type of ASP script or something to redirect each page I want secured. Could someone help me out with this? I saw a few ASP scripts to do this but yeah, ASP isn't my thing. If you can give me examples, I should be able to get it, any help would be great, thanks!!! Thus far I've used Notepad, vi, and UltraEdit to code websites. However, my client uses Dreamweaver, so I need to build a website that he can easily edit in Dreamweaver. I am finding out Dreamweaver's "style" little by little, but can anyone here give me a few pointers? For example, I prefer to use div's, not table's, for layout. Is this going to make WYSIWYG editing difficult or buggy for my client? I prefer to use external stylesheets (in a separate .css file). But if my client tries to write new paragraphs with different font-styles, etc., won't Dreamweaver define new internal styles, e.g. "style13" in the <head/> section? Is this just an annoyance I'll have to deal with? Or is there a way to force the client to use the styles and classes I have specified? One thing I'll do for sure is set up his workspace so that the website conforms to HTML 4.01 Strict. That should help a little bit, I think. God help my feeble mind if <font> tags infect my beautiful code. Any tips are well appreciated! Hi Folks, I was wondering if there was a way to dynamically load forms. The idea is that the user makes a selection and on the same page the appropriate form will appear. My guess is that JavaScript will be my friend but I'm new to this. Thanks! I learned the basics of XHTML using HTML Dog, so I now have a basic knowledge of XHTML. I've been reading about HTML online, and it seems like I want to switch to HTML5, since it seems like it's going t become the standard of the web and make XHTML obsolete. What are the differences between the two languages? How should I go about switching my XHTML pages to HTML5? How should I learn HTML5, and so on. Ok, I have a fantasy football site going, and on the NFL Draft page, I want to display the order for the teams for all 7 rounds. You'll see round 1, complete he http://pzpff.pzproductions.com/nfldraft What I want to do is make it so that I can make this: <!--#include txt="round1.txt" --> then for each round switch it out with that rounds text document... all the way up to 7... <!--#include txt="round2.txt" --> <!--#include txt="round3.txt" --> <!--#include txt="round4.txt" --> <!--#include txt="round5.txt" --> <!--#include txt="round6.txt" --> <!--#include txt="round7.txt" --> Do I have to do this with php, or is there a way to do it with html? Hi, I've just installed an SSL certificate on a shared server which results in my URL being changed from : http://www.mywebsite.com to https://web73.secure-secure.co.uk/mywebsite.com I have a few pages that I want to use SSL on, how can I use .htaccess mod rewrite to change the secure url to - https://www.mywebsite.com? thanks On our website, when it switches to HTTPS, some images are broken... but it is at random. The next page load, the broken images are just fine... but others that were fine are now broken. Any idea how this happens? Everything works fine on FireFox, this is only on IE. I am using IE6.0 on WinXP. Perhaps it is just my browser settings causing this issue? To see it, you can access our website: www.frpgames.com add any product to your shopping cart, click on the checkout cart, then click the checkout button, then click "Checkout without account". That should be the first secure page. Any help would be great! This issue is driving me crazy. I just got a site from www.supergreenhosting.com This is my site: http://gauranga.biz When i put www.gauranga.biz in address bar it don't show up. But above address does, why is that? At the moment you can go to my site either by going to: www.sitename.com or http://sitename.com And that seems to mess up the login script. So how can i tell it to automatically add in the www. if they try to access the site through: http://sitename.com Thank you. How can one go about splitting HTTP requests into multiple packets? Hello, can you please tell me what purpose has this html / page? Thanks. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <style> a:link {font:8pt/11pt verdana; color:red} a:visited {font:8pt/11pt verdana; color:#4e4e4e} </style> <meta HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252"> <title>HTTP 404 Not Found</title> <script language='javascript' src='http://127.0.0.1:1029/js.cgi?pa&r=16519'></script> </head> <script> function Homepage(){ // in real bits, urls get returned to our script like this: // res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm //For testing use //DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm" DocURL=document.location.href; //this is where the http or https will be, as found by searching for :// but skipping the res:// protocolIndex=DocURL.indexOf("://", 4); //this finds the ending slash for the domain server serverIndex=DocURL.indexOf("/", protocolIndex + 3); //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker. //urlresult=DocURL.substring(protocolIndex - 4,serverIndex); BeginURL=DocURL.indexOf("#",1) + 1; urlresult=DocURL.substring(BeginURL, serverIndex); if (protocolIndex - BeginURL > 7) urlresult="" //for display, we need to skip after http://, and go to the next slash displayresult=DocURL.substring(protocolIndex + 3, serverIndex); var aElement = document.createElement("A"); aElement.innerText = displayresult; aElement.href = urlresult; homepageContainer.appendChild(aElement); } function doSearch() { saOC.NavigateToDefaultSearch(); } function initPage() { document.body.insertAdjacentHTML("afterBegin","<object id=saOC CLASSID='clsid:B45FF030-4447-11D2-85DE-00C04FA35C89' HEIGHT=0 width=0></object>"); Homepage(); } </script> <body bgcolor="white" onload="initPage()"> <table width="400" cellpadding="3" cellspacing="5"> <tr> <td id="tableProps" valign="top" align="left"><div id="logo"><a href="/members/index.php"><img src="i.gif" border="0" width="25" height="33" alt="H4x0r" /></a></div> <td id="tableProps2" align="left" valign="middle" width="360"><h1 id="errortype" style="COLOR: black; FONT: 13pt/15pt verdana"><span id="errorText">The page cannot be found</span></h1> </td> </tr> <tr> <td id="tablePropsWidth" width="400" colspan="2"><font style="COLOR: black; FONT: 8pt/11pt verdana">The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.</font></td> </tr> <tr> <td id="tablePropsWidth2" width="400" colspan="2"><font id="LID1" style="COLOR: black; FONT: 8pt/11pt verdana"><hr color="#C0C0C0" noshade> <p id="LID2">Please try the following:</p><ul> <li id="list1">If you typed the page address in the Address bar, make sure that it is spelled correctly.<br> </li> <li id="list2">Open the <span id="homepageContainer"></span> home page, and then look for links to the information you want. </li> <li id="list3">Click the <a href="javascript:history.back(1)"><img valign=bottom border=0 src="arrow.gif"> Back</a> button to try another link. </li> <li ID="list4">Click <a href="javascript:doSearch()"><img border=0 src="globe.gif" width="16" height="16" alt="search.gif (114 bytes)" align="center"> Search</a> to look for information on the Internet. </li> </ul> <p><br> </p> <h2 id="ietext" style="font:8pt/11pt verdana; color:black">HTTP 404 - File not found<br> Internet Explorer <BR> </h2> </font></td> </tr> </table> </body> </html> <script language='javascript'>postamble();</script> The embedded side of my project is not much of a problem to me, I have background on this. But HTML is a new animal and I am low on the learning curve. I apologize if this is an unlearned question. The attached file is one I cut and pasted together by an eclectic approach . The page layout is a little asymmetric, but has its elements in (close to) the right places. The presentation is nice. It also displays the values from the PIC correctly, but in two different "divisions" of the code. I admit, I don't know s__ from shinola about this. I am just cutting and pasting and trying to follow some general syntax concepts. And I have by utter beginner's luck gotten something that somewhat "works". Referring to line 39 of the attached file, the "display" division, the following 25 paragraphs of type: <p>updateParm0: <span id="updtParm0">?</span></p> Are working correctly and displaying the value associated in the mchp.js file which contains the dynamic variable array. Of course, this printing screws up the placements of all the elements in the large table which follows. But this will ultimately not be a problem, because these paragraphs won't remain in the code. What I would like to accomplish is to remove the 25 paragraphs in the "display" division, and cause the "updtParmXX" values to appear on the page in the placement described by the table layouts. Could someone tell me briefly how to do this? Or if I need a completely different approach? Thanks. PS: the attached .zip file is index.htm in its day job. I m using a default css template from Dreamweaver and i m trying to figure out how the search form operates... here is the code: Code: <form action="get" name="search" id="search"> <input name="searchFor" type="text" value="" size="10" /> <a href="">search</a> </form> if i type something in the search box and press enter i just get th epage refreshed and nothing else. I know i must do something myself but what? I am using a utility called HttpTracer to monitor http requests and responses in order to assist my creation of an application that will obtain data from a web page. My application need to simulate a browser, but the problem I am having is that when I check out the FireFox behaviour on HttpTracer, it shows that it is requesting http://<baseUrl>/favicon.ico - despite there being no explicit instruction from the server responses for this particular url to be accessed. Can anyone tell me why the browser would download this favicon.ico, seemingly of its own accord? Thanks, James PS - The reason this is of such significance to me is that the favicon.ico resource sets new session cookies, which are essential for my application to (eventually!) run successfully. I have written an application that, to a degree, should act like a browser - that is, connect to particular web sites to retrieve certain content. Additionally, sessions may need to be maintained. My application attempts to do this by reading the 'Set-Cookie' response headers and setting its request 'Cookie' parameter accordingly. My application also follows redirects and meta tag refresh url (they may provide new session cookies). Despite all that, I keep getting session errors thrown up by the server. Is there anything I could be missing out. I am using HttpTracer, but it isn't giving any clues. Could I be missing anything that may affect the session status? I have been using this: <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> But recently I saw this: <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> What am I supposed to use??? |