HektoR Posted January 25, 2009 Share Posted January 25, 2009 hi all. all redirect script which i tried not working in opera. <script type="text/javascript"> window.location = "http://www.google.com/" </script> also php and html redirect. what can i do ? Quote Link to comment https://forums.phpfreaks.com/topic/142337-redirect-in-opera/ Share on other sites More sharing options...
landavia Posted January 25, 2009 Share Posted January 25, 2009 <html> <head> <title>IU Webmaster redirect</title> <META http-equiv="refresh" content="5;URL=http://www.indiana.edu/~wmhelp/new-directory"> </head> <body bgcolor="#ffffff"> <center>The contents you are looking for have moved. You will be redirected to the new location automatically in 5 seconds. Please bookmark the correct page at <a href="http://www.indiana.edu/~wmhelp/new-directory"> http://www.indiana.edu/~wmhelp/new-directory</a> </center> </body> </html> http://webmaster.indiana.edu/tool_guide_info/refresh_metatag.shtml sry.. no time to explain.. just read the link the main source was here <META http-equiv="refresh" content="5;URL=http://www.indiana.edu/~wmhelp/new-directory"> Quote Link to comment https://forums.phpfreaks.com/topic/142337-redirect-in-opera/#findComment-745873 Share on other sites More sharing options...
haku Posted January 26, 2009 Share Posted January 26, 2009 Both of those methods are frowned upon by search engines. Use a server side redirect. For php it will look like this: header("Location: www.site.com"); Quote Link to comment https://forums.phpfreaks.com/topic/142337-redirect-in-opera/#findComment-746264 Share on other sites More sharing options...
BioBob Posted January 29, 2009 Share Posted January 29, 2009 You forgot the semicolon at the end of your script. Keep an eye out in the lower left hand corner if youre using IE for the yellow exclimation point. Im not too familiar with Opera but javascript is like php, needs a ; character at the end of every command basicly. window.location = "http://www.google.com/"; Quote Link to comment https://forums.phpfreaks.com/topic/142337-redirect-in-opera/#findComment-749569 Share on other sites More sharing options...
haku Posted January 29, 2009 Share Posted January 29, 2009 semi-colons are optional in javascript, unless you are running multiple commands on one line. I never use them myself. Quote Link to comment https://forums.phpfreaks.com/topic/142337-redirect-in-opera/#findComment-749572 Share on other sites More sharing options...
TheFilmGod Posted January 29, 2009 Share Posted January 29, 2009 A php header redirect is also frowned upon by search engines. I would use either a temporary or permananet htaccess redirect. PHP header redirect is useless for login scripts or anything search engines would be unable to access. Quote Link to comment https://forums.phpfreaks.com/topic/142337-redirect-in-opera/#findComment-749663 Share on other sites More sharing options...
haku Posted January 30, 2009 Share Posted January 30, 2009 A php header redirect is also frowned upon by search engines. I would use either a temporary or permananet htaccess redirect. Search engines cannot tell the difference between a php redirect and .htaccess redirect. They both occur serverside, and are both served up by the server as a header. On top of this, with php redirects, you can attach HTTP error code stating that it is a permanent, temporary, or other redirect, which the search engines DO like. So I have to politely disagree with you, and say that you are in fact wrong with that comment. Quote Link to comment https://forums.phpfreaks.com/topic/142337-redirect-in-opera/#findComment-750305 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.