HTML - Website Redirect Depending On Last Url.
Hi,
I want my website to redirect depending on the last URL so if the last website was http://Abc.com/a it would redirect to http://google.co.uk but if the last URL was diffrent it would redict to anouther URL. Thanks. Similar TutorialsI wrote a code that I am assuming you guys should know exactly what I want my web page to do, however I can guarentee there are flaws in it since this is my first xhtml script ive written. I do know basic programming language making this code easier to read and uenderstand. So please review my code get an idea of what I am trying to do and help me write it to get it to work. \\common resolutions: 800x600, 1024x768, 1240x800 $resolution = "screen.width'x'screen.height"; \\This should detect the resolution correct? If switch ($resolution){ case "800x600": onLoad="ScreenGoToURL('Index1.php')"> \\I am assuming this will redirect to Index1.php if the resolution is 800x600 break; case "1024x768": onLoad="ScreenGoToURL('Index2.php')"> \\redirects to index2.php if 1024x768 break; case "1240x800": onLoad="ScreenGoToURL('Index3.php')"> \\redirects to index3.php if 1240x800 break; case "320x480": onLoad="ScreenGoToURL('Index4.php')"> \\redirects to iTouch page break; } else { onLoad"ScreenGoToURL('Index.php')'> \\This will redirect them to a uknown screen size? Thanks in advance Hi, Sorry if this is not the right place to put it. My friend asked me to look into his friend small website as he is not searchable via google. I had a look at his website and seen that he has been using a "VistaPrint SiteBuilder v20.5" to build his website. His website looked like it was redirecting from a different website address. Inside his code he had the normal links with index.html and products.html etc without the full address but i could see on the bottom of the browser that the address has a subdomain and different address (like URL address bingo.website) once i roll over the links. So i persume he is redirecting the whole website from that address. Also, once i click on the other links his address stays the same as his main index address. e.g (URL address mydomain) (once i click on products it stays the same without the products.html added onto the end). Never seen this before. Is that what that sitebuilder does? Is this a problem for google.....would they blacklist it for that reason. However, when i did the sitemap am i allowed to add the index page as the website address he wants searchable and the other links as subdomain and different address e.g (URL address bingo.website) or i'll just have to use index page alone? hi team, just wondering what code i would require to make a text box with a search button next to it and having the following characteristics... * input can be any letter/number (say for eg: 5555) * onclick sends parent window to www.website.com/5555 thus whatever you enter into the box sends you to a website address with the text box entry at the end. this is for an internal webpage at our small business. cheers and any tips appreciated!! Hi, Is there any script or way to view/hide a div or similar tag only if you're on windows/mac/linux? I want a div to show if you're on windows/linux and an other if you're on a mac. Thanks in advance! Hello, Trying to put together a portfolio site for an assignment. I've managed to hammer out most of the kinks (aside from some css formatting), but for some reason when the page reaches a length that requires vertical scrolling the entire site shifts slightly to the left. Here's the site right now as it is: http://kool-factor.com/index2.php I've added a few repeat posts on the Home page to get the desired effect (can also be seen on Curriculum Vitae). The Contact page is shorter, and shifts back to the right. Strangely, when the Home page only has one post, it is also shifted to the right. I don't think it's a PHP problem (though it could be, and I just don't know about it), so I've been trying to go through the HTML and CSS, but am coming up short. Anyway, here's the index2.php code: PHP Code: <?PHP $default = 'home.php'; $page_Title = $page_Content = ''; $page=$_GET['id']; function loadInclude($file, $default, $dir='') { global $page_Title, $page_Content; if(empty($file) || !$file) $file = $default; if(!file_exists($dir . $file . '.php')) $file = $default; /* echo 'Including: ' . $dir . $file . '.php<br />'; */ include($dir . $file . '.php'); } if(isset($_GET['id'])) loadInclude($_GET['id'], 'home', ''); else include $default; ?> <!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>Curtis Winger<?php echo $page_Title;?></title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="main"> <table border="0" cellpadding="0" cellspacing="0" id="headertable"> <tr> <td class="titleleft"><img src="head.png" alt="" /></td> <td class="titleright"> <div id="navmenu"> <a <? if( ($page == 'home') || ($page == '')): ?> class="current" <? endif ?> class="navlink" href="index2.php">Home</a> <a <? if($page == 'projects'): ?> class="current" <? endif ?> class="navlink" href="index2.php?id=projects">Projects</a> <a <? if($page == 'cv'): ?> class="current" <? endif ?> class="navlink" href="index2.php?id=cv">Curriculum Vitae</a> <a <? if($page == 'contact'): ?> class="current" <? endif ?> class="navlink" href="index2.php?id=contact">Contact</a> </div> </td> </tr> </table> <?php echo $page_Content;?> <table border="0" cellpadding="0" cellspacing="0" id="footertable"> <tr> <td>© 2009 Curtis Winger</td> </tr> </table> </div> </body> </html> The CSS: Code: @charset "utf-8"; /* Layout Design */ body { background-color: #E6E6E6; font-size: 14px; font-family: Verdana, Arial, Helvetica, sans-serif; } #main { background-color: #FFFFFF; display: block; width: 800px; margin-top: 15px; margin-right: auto; margin-bottom: 15px; margin-left: auto; padding-top: 10px; padding-right: 30px; padding-bottom: 10px; padding-left: 30px; left: auto; right: auto; } #headertable { width: 100%; text-align: center; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #000000; padding-top: 0px; padding-right: 0px; padding-bottom: 13px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; } #footertable { width: 100%; text-align: right; border-top-width: 2px; border-top-style: solid; border-top-color: #000000; padding-top: 7px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 7px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; } .titleleft { width: 80%; } .titleright { width: 20%; } .align-right { float:right; margin: 0 0 5px 5px; } .align-left { float:left; margin: 0 5px 5px 0; } /* Text */ .h1 { font-size: 17px; font-weight: bold; color: #5e89ae; font-family: Verdana, Arial, Helvetica, sans-serif; } .titletext { text-align: center; } .contenttext { display: inline-block; width: 92%; clear: both; float: right; right: 0px; } .contenttext2 { display: inline-block; width: 84%; clear: both; float: right; right: 0px; } /* Links */ a { color: #000000; text-decoration: underline; } a:hover { text-decoration: none; } #navmenu a { display: block; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; border: none; height: auto; width: auto; padding-top: 3px; padding-bottom: 3px; padding-left: 5px; text-align: left; background-position: right; font-weight: bold; background-image: url(bullet.png); background-repeat: no-repeat; } #navmenu a.navlink:link, a.navlink:visited { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; text-decoration: none; font-weight: bold; background-position: right; } #navmenu a.navlink:hover, a.navlink:active { background-color: #E6E6E6; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; text-decoration: none; font-weight: bold; background-position: right; } #navmenu a.current { background-color: #E6E6E6; !important display: block; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; border: none; height: auto; width: auto; padding-top: 3px; padding-bottom: 3px; padding-left: 5px; text-align: left; background-position: right; font-weight: bold; background-image: url(bullet.png); background-repeat: no-repeat; text-decoration: none; } And a sample page, home.php: PHP Code: <?PHP $page_Title .= ''; $page_Content .= ' <img src="images/home_image.jpg" class="align-left" alt="" /> Hello, and welcome to the launch of my new website. <br /><br /> I\'m an aspiring graphic designer and filmmaker, and you\'ll find a collection of my work here, as well as information regarding my education, work experience, and technological experience with various applications. <br /><br /> Relevant news and updates concerning myself, or my work, will be posted on this page, so keep an eye out. <br /><br /> If there\'s anything I can do for you don\'t hesistate to contact me. <br /><br /> Enjoy. <br /><br /> <strong>Posted by Curtis | November 16, 2009</strong> <br /><br /> <img src="images/home_image.jpg" class="align-left" alt="" /> Hello, and welcome to the launch of my new website. <br /><br /> I\'m an aspiring graphic designer and filmmaker, and you\'ll find a collection of my work here, as well as information regarding my education, work experience, and technological experience with various applications. <br /><br /> Relevant news and updates concerning myself, or my work, will be posted on this page, so keep an eye out. <br /><br /> If there\'s anything I can do for you don\'t hesistate to contact me. <br /><br /> Enjoy. <br /><br /> <strong>Posted by Curtis | November 16, 2009</strong> <br /><br /> <img src="images/home_image.jpg" class="align-left" alt="" /> Hello, and welcome to the launch of my new website. <br /><br /> I\'m an aspiring graphic designer and filmmaker, and you\'ll find a collection of my work here, as well as information regarding my education, work experience, and technological experience with various applications. <br /><br /> Relevant news and updates concerning myself, or my work, will be posted on this page, so keep an eye out. <br /><br /> If there\'s anything I can do for you don\'t hesistate to contact me. <br /><br /> Enjoy. <br /><br /> <strong>Posted by Curtis | November 16, 2009</strong> '; ?> If you have any ideas, or need anything else, let me know. Thanks guys. Hey everyone, is there a way that i can make the text under welcome stay where it is even when the screen isnt maximized? Because right now when you un-maximize the browser window, the text goes all weird and out of the box. http://wiseones.50webs.com/ hello, i need a website for german customers, somethign like www.podmod.de because i would like to offer the same. So if anyone has an idea where to start, or even can offer me something i can buy, please do so. my email: verenamueller999@web.de thanks verena. Hi, I am trying to find a way in which a website that is linked on my homepage can be opened while keeping at least one form of my homepage open as well. e.g.: Google images :http://images.google.com/imgres?imgu...en-us%26sa%3DG sorry for the massive link. Hope you get the idea. So what i want is to have a bar on top that is my homepage (like the google bar in the link), but the rest is the actual website that has been linked. I don't really care much about the url. It doesn't have to be my homepage url, it can be the actual website url. Google has been able to do that somehow, so it is possible. I would just like to know how and if it is hard to do. If someone knows how to do it, it would be great if you could give me a link to a tutorial, or explain it. thanks I have some links (in the header, the SUPPORTERS) to different websites, but when I click on them the address in the address bar does not change to the address of the website that I clicked. How do I make it show the address that I clicked on? Thanks. http://www.ac.wwu.edu/~fencing/ I am a total noob but volunteered to administrate the website, because there was no one else to do it. Hi How to add a website counter to my website. So that when ever a visitor visits the website I want the counter to increase say from 101 to 102 and then for a new visitor it should be 103 and then again for the next visitor 104 and so on..... I want to know the code. There are number of websites that are offering this but they put their advertisement which I don't want I went to a site for optimization & on review it told me my site had a re-direct, which was bad. Its been awhile since I tinkered with my site, so beats me where I put it. Can anyone help find out where it is? Newbie to this forum. Thanks. website is: kallico.net Thanks for any help on this, or anything else to help it get noticed more. Hello all, So I am doing site management, and I have a problem with a redirection that is going on. There is a directory in the root called venngo (http://url/vengngo/) however it redirects to a different page all together, so I removed the folder, uploaded a new one, and it still redirects. I have checked my cache and multiple machines, so I know it is not on my side. The only time my page works is if I physically add /index.php tot eh directory to make it (http://url/vengngo/index.php) What should I be looking for in the files for the website for a possible redirection script. Maybe htaccess? I have a link going direct to pdf documents on one site eg www.one.com/blah.pdf. The pdf's are moving to a new web site www.two.com/blah.pdf. How do I redirect people that link direct to the old pdf to the new one. These pdfs are coming up very high in Google. I was hoping if I changed them to redirects Google would follow. Also for those that have a link in their web site to these pdfs it will be broken when I move them to the new url. hi how do u use a redirect 301 code in html file in a website ? and wat is the use of that ? Redirect might not actually be the thing that I'm looking for, but I here's what I'm looking for. When you visit the website, and image is shown taking up the whole page. It stays for 2-5 seconds, then redirects you to the normal home page. (Maybe the image would also be a link to the home page so people could speed things up) Thanks very much. Hello I'm redirecting pages using 301 redirect in my htaccess file, like redirect 301 "/servicesxxx.php" http://www.site.com/services.php but I have a page like this: www.somename.site.ca/indexpage.php I tried putting the whole thign in there but it doesn't work. How can I successfully redirect that page? I have a situation where I snd peoplle to a different page to do a download and I want them to be redirected back as soon as the download completes. Is there a command for that? can someone tell me how i would go about creating a redirect for an old RSS feed. i want the old feed address to point to my new Wordpress-created RSS feed address. i searched around a bit and found this code snippet... Code: <?xml version="1.0"?> <redirect> <newLocation>http://www.wepub.com/myweblog/rss.xml</newLocation> </redirect> ...but when i put it in place of my old feed code, here was the browser result... Code: This XML file does not appear to have any style information associated with it. The document tree is shown below. <redirect> <newLocation>http://www.wepub.com/myweblog/rss.xml</newLocation> </redirect> am i doing this wrong? what is my best option? hi, i need some help with this. the following line is in a script <META http-equiv='refresh' content='1; URL=http://lblah.com/radio.php?ipp=84.95.247.20&port=22930&ch=898'> now this script redirects to another page.. is there some way i can get it to do this without actually leaving the page im on. thanks in advance for your help Is there any HTML code to redirect mistyped urls? Let's say someone wanted to get to a music section of my site. They type in XXX.com/music instead of XXX.com/music.html. Any way to get this done? |