HTML - Get Referring Page And Redirect If From A Specific Site
Hello,
I'm a windows app programmer, but don't know too much about HTML. I use Frontpage to maintain my web site. I need to check the referring page, and if it equals what I want, then I need to redirect to another page. OK, to explain further, I've had a web site for years. Lets call it www.p.com. Yesterday, I registered two new domain names, we'll call them www.a.com and www.b.com. I had my web host simply make them pointers directly to www.p.com. So, when users type in www.a.com or www.b.com, they are automatically taken to www.p.com. This is OK...but, it is causing some issues. What I'd like to do is, when the page (www.p.com) is loaded, I want the page to check the page the user came from, such as www.a.com. If it was www.a.com or www.b.com, then I want to re-load www.p.com, so that the page is refreshed so that it actually was www.p.com and not a re-direct from www.a.com. Can I do this? and how can this be done? Many thanks in advance! domls Similar TutorialsHi, I am trying to set up a webpage where the only way someone can access it is if they came from my facebook page. What is the easiest way to do this? thanks in advance. I am a beginner when using HTML so this is probably simple but I cannot find the answer anywhere; apologies. I have thousands of pages each of which has a unique name. I'd like to display an image on each page. The source for the image is always /image/PAGENAME.jpg. The pages are generated by a process I cannot affect (if I could, this would be simple). I am instead left with the final pages each of which requires this customisation. Is there anyway to refer to the page name in the image source tag? HTML does not seem to handle variables and I cannot really see another way around it. I guess I could try creating a script which edited all the pages, but I am not confident enough to be able to write such a script. Any help would be extremely gratefully appreciated, Ben Hi All! I have to link to a website from a clients site. BUT they want the link to go to a "FOR RENT" page... the thing is that the site I'm linking to uses frames, and if I link to the "FOR RENT" frame then the maine frameset doesn't show up... Any ideas? Thanks, Tom How to redirect to WEB B when open WEB A? Hi all, I got a unique issue. I would like to redirect from one site (which is obsolete and the owner no longer wishes to use) to the updated one. I know that PHP has a redirect function, but instead of just redirecting and not giving a heads up of what is happening, I would like to display a message to the user indicating that the current site is no longer used and that the new one is where all the new/updated stuff is located. Sorry if this is a wrong place to post, but this is a pretty broad problem from my perspective. Is there something that I can do only in pure HTML? Would I need to use JavaScript (which I don't know jack about)? Can I just use a scripting language like PHP? Hi guys. I have no idea which category to post this in, or if it's even possible to achieve, so think of it as a challenge to your web skills In Visual Basic you can build a routine that checks a value (such as today's date). If today's date matches the date stored then an action will occur. My question is, can this be done with a web page? I'd like an index page to be active until a certain date, and after that date I would like it to automatically redirect to a different page which carries a message for the user. The page should operate completely normally until the date I set is reached, with no sign that anything is going to happen. Once the date is reached, anyone calling the index page will be instantly redirected to my message page instead. What do you think? Is it a possibility? I have created a web page in ASP.Net, but completely using HTML codes. This web page shows first 25 hit movies in year wise. I have 2006, 2007 and 2008 year's details in 3 different tables (HTML Tables). All of them are in one page When user clicks main page, it shows all the three year details in tables. User has to scroll down the apge to see full details. Here, I want to give 3 page sections (or page breaks).. If user clicks main page urs, it should show all and user have to scroll down...if user press 2006, it shoud take him to that specific area. If similarly if user clicks 2007, it should take him/her to 2007 details area.. How to do this? I heard that with 'submenubullet', we can do this...Please help me on this Hello Folks I want to be able to anchor to not only a different page, this is a simple link, but I also want to be able to go to a specific point on that new page from the original hyper link... Example; I am viewing on page "A," on my site and I want to set a link on page "A" to take me to page "B" to the word "Widget." On page "B" I have the word "Widget" 2/3rds the way down the page. I want to go further than just to the top of page "B," I want my SAME link from page "A" to take me to the word "Widget" that is near the bottom of the page "B" all in the same link. (One click) I understand I am going to need to set code at each word, this is a lot of work and this is OK.. Thank You So Very Much for any assistance David is there a way to link to a location on a page like in the example below but instead of the link existing on the same page as the target location, the link exist on one page and points to a bookmark on another page? So for example, I want index.html to have a link that takes the user to chapter 4 of content.html (which is half way down the page) Code: <p> <a href="#C4">See also Chapter 4.</a> </p> <h2>Chapter 1</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 2</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 3</h2> <p>This chapter explains ba bla bla</p> <h2><a name="C4">Chapter 4</a></h2> <p>This chapter explains ba bla bla</p> I'm using an iframe to show an external page. I want the iframe to open to a certain part of that page. Problem is, it's like 2 pages down on the external page. How can I make it scroll down and show only that part? Hi there i was wondering if it was possible to click on an image that has been mapped and have it open another web page but at a specific location. for example i have a large image of the U.S. i would like to have a smaller image that is mapped to be able to jump to the larger image at that specific location like if i click the northeast porition of the U.S. on the small image i would like it to load the larger image at the northeast porition of the U.S. using just html if possible? thanks for any help. I need to know how to define in html a 'class' for lack of a better term so i can make the hyperlink go to page.html#specificpoint I know how to do the hyperlink, just not define where it would load to... Trying to see if someone has a work around for this. I have a vbulletin forum with a shoutbox and I would like to move the shoutbox to a page outside of the forum. I did this before with an iframe when I had phpbb3 but have not been able to do this with vbulletin. I now have the shoutbox on an external page but it still contains the header and footer and I have not found a way to remove these. I just need the actual shoutbox approx 730px by 350px. Is there a way to pull only the specific area of a page to another page? *****Edit Resolved ********* Hi guys, I'm working on a project which requires an HTML page to be updated regularly, say every 10 seconds. however its not the whole page i need to refresh but rather a section of it. that section in question is a table that has status icons within. those status Icons receive values from a server and update accordingly. the following code corresponds to those images you see in the attachment. HTML Code: <td width="100" style="TEXT-ALIGN:center" onclick="showNFailDialog('{IP_ID}','{ZONE_ID}','{GROUP_ID}');"> <IMG style="WIDTH:24px;HEIGHT:22px;CURSOR:hand" class="ZState NFail" name="disp" alt="Zone {ZONE_ID}" src="../../Icons/circle_cancel.png" eis="name:{IP_ID}.{ZONE_ID}.{GROUP_ID}.Alarm;type:1;virtual:1;img0:/Icons/circle_green.png;img1:/Icons/circle_red.png;"> </td> this line basically says value 0 shows green, value 1 shows red.. img0:/Icons/circle_green.png;img1:/Icons/circle_red.png Is there a way I can insert some code into the image section that makes the image refresh every so often but without refreshing the whole page/table your help is greatly appreciated Hello! I'm kinda stuck trying to get this idea on HTML for my web site: www.luzvenidera.com/webnueva/indexinframe.htm This is the thing: I want the content to appear in the main rectangle, and have it resize automatically to the content. I have been able to do this with an inframe and using a specific script. Next to the content there are cells with an image that should go on the top of each cell and a background tiled image that continues the pattern. At least on my computer, the current code works in IE7, but in FF3 the image inside the side cells ends up showing in the middle instead of the top. I have also read that using inframe isn't really a good idea for the main content section of the page, for a variety of reasons including that it's not search engine friendly, so I'm trying to figure out an alternative.. I'm stuck here. If I make an entire frame beneath the navigation bar and just add the content there then the scroll bar would only show up for that frame, that is, beneath the navigation bar. I want the whole page to have the scroll bar, I don't want the header and navigation bar to stay in place while the rest of the content is scrolled as the background in the sides would break. My questions would be: what should I do to make it so I have the content in a frame, having it expand so the content would fit, without screwing up the side bars and making the whole page scrollable to read the content? I really don't want to make an instance of the whole page tailored to each section's content. I'm also getting ActiveX warnings in IE that prevent the inframe to show up unless it's manually permitted.. if I'm forced to use inframe, is there any way to prevent this? I hope I'm being clear, and would really appreciate any advice! I'm new to most of this stuff, and I got a big headache trying to figure this one out! Thanks in advance! I don't have the ability to add an anchor to the page, it's not mine, but I'd like to link to a specific area on the page. Is that possible without that page having some sort of anchor already on it? Hello, If I were to change my pages from thispage.html to thispage.php or this-page.html how would I make sure that the old page will redirect to the new one? Ladies and gentlemen, I'm just a beginner to HTML. I'm trying to develop my own web page but there is still lots of things under construction. Now just the home page and some of hyperlinks are finished and available. Most of other hyperlinks are unavailable and under construction, that's why when I click over these unavail. hyperlink, the browser always tell me "the page can not be displayed"... My idea is that I would like to know how to displayed a specific page which has the message "Sorry, this page is currently under construction". So everytime I cick over any link that is unavailable, it will show me this particular page with the message on... Does anynbody know how to do this, could you please advise me how to write code to get this done. Please help me, your help is highly appreciated... Many thanks & best regards, Hao. Hello all i've been doing some research on my own and am simply trying to redirect my site "ndcubed.com" to "ndcubed.com/Construction/Constuction.html" when my site is undergoing maintenance. I've managed to read up on some tutorials and have found that this is apparently supposed to work: In the .htaccess file Code: Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_URI} !/Construction/Construction.html$ RewriteRule $ /Construction/Construction.html [R=302,L] This works like a charm and redirects all my pages to Construction.html however if you try going to my site the redirected URL is simply a blank page. However when the code in the .htaccess file is removed it isn't blank and displays normally. What could be going wrong, why would a redirect cause this page to not load correctly? Nothing is loaded except plain text, even the page background isn't displayed. Thank you for your help, I feel like i'm so close to getting this solved. Construction.html source: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- body { background-image: url(Images/lightGrayBack.png); background-repeat: repeat; } --> </style></head> <body> Test </body> </html> There is an ivalid page on www.google.com and it directs me back to the home page. Why is that? |