hey guys, I will admit I'm a novice, I'll save you the guess!...I'm trying to do a simple meta refresh redirect on a search engine page... this is my page viagrasearch.freehostia.com ....I'm trying to get it to go right to the "cheap viagra" option on the page, instead of having to select it from the main search engine page. So I go into freehostia's "file manager" and alter the "index" and "results' files... I replace(I'll highlight in red); <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Pharma</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="<%path%>styles.css" rel="stylesheet" type="text/css"> </head> with; <META http-equiv="refresh" content="0;URL=http://viagrasearch.freehostia.com/index.php?qq=Cheap%20Viagra&tmpl=0102&theme=pharma"> It does work(Yes!), however I can't seem to get it to redirect without stopping on the main search engine page before it does its redirect? I read somewhere to replace the "0" with "s" but that didn't have any effect....? Can anyone tell me how to affect an immediate redirect without stopping on the main search engine page..? Thanks guys...!
What about using javascript? <script type="text/javascript">window.location='http://viagrasearch.freehostia.com/index.php?qq=Cheap%20Viagra&tmpl=0102&theme=pharma';</script> Code (markup): The best solution would be to do a 301 redirect with PHP, .htaccess or within the control panel of your host.
thanks NFD, I appreciate it...I simply am too much of a novice to put your suggestion into play. I can only handle a plain text editor for html at this point... I did go into the CP on the host, they allow to select the type of PHP 4 or 5 or 6, but no further alterable option seems to be available for PHP... If you have any other ideas I'm all ears.....
if your page is index.php, add this code to the very top before any other code: <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://viagrasearch.freehostia.com/index.php?qq=Cheap%20Viagra&tmpl=0102&theme=pharma" ); ?> PHP:
Thanks ndf, It does have a "index.php" file, when I put that code in and save it I get this error in firefox; Redirect Loop Firefox has detected that the server is redirecting the request for this address in a way that will never complete. Maybe I should just accept that the HTML redirect will not redirect immediately and instead show an intermediary page, before switching to the desired destination page?...... Any other ideas?
How about this: <?php if (!isset($_GET['qq'])) { Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://viagrasearch.freehostia.com/index.php?qq=Cheap%20Viagra&tmpl=0102&theme=pharma" ); } ?> PHP:
put this script in the body of your start page <SCRIPT LANGUAGE="JAVASCRIPT"><!-- manufacturer=navigator.appName version=navigator.appVersion; if (navigator.appName=="Netscape") // or Fire fox or Opera ... location.href ='your address'; else if (navigator.appName=="Microsoft Internet Explorer") location.href ='your address'; --></SCRIPT>
ndf thanks...! That second one did work.....! I really appreciate it... Thanks Palme....I'll keep that on file in case I ever have a problem with getting the php ....I might give it a whirl as I try to create more search engine pages.. it's appreciated....I might as well test it, and play with it... thanks G4L, but they don't seem to have a forwarding option, maybe because it's a subdomain..not sure..I even did a search in their faq help area and came back nothing in terms of forwarding...kind of odd... thanks guys...!