PDA

View Full Version : redirecting..how?


SpongeBobby
08-13-2002, 06:45 AM
I have a site that is under the works..instead of typing a million pages on why the certain link dont work, and i dont wanna change the link address..

Does anyone know the code to redirect the site to somewhere else..so i can stick it in the pages and have them redirect to the annoucement page??


Thanks

duniyadnd
08-13-2002, 08:04 AM
<script>version=parseInt(navigator.appVersion);if (navigator.appVersion.indexOf('5.')>-1){version=5};if (navigator.appVersion.indexOf('6.')>-1){version=6}; browser='OTHER'; if (navigator.appName=='Netscape'){browser='NS'+version;} if (navigator.appName=='Microsoft Internet Explorer'){browser='MSIE'+version;} if (navigator.appVersion.indexOf('MSIE 3')>0) {browser='MSIE3';} if(browser == 'NS5'){browser='NS6'};if (browser=='MSIE3') {window.location='http://www.yahoo.com'}if (browser=='MSIE4') {window.location='http://www.yahoo.com'}if (browser=='MSIE5') {window.location='http://www.yahoo.com'}if (browser=='MSIE6') {window.location='http://www.yahoo.com'}if (browser=='NS3') {window.location='http://www.yahoo.com'}if (browser=='NS4') {window.location='http://www.yahoo.com'}if (browser=='NS6') {window.location='http://www.yahoo.com'}if (browser=='OTHER') {window.location='http://www.yahoo.com'}</script>

got it from: http://www.echoecho.com/toolbrowserredirect.htm

Duniyadnd

SpongeBobby
08-13-2002, 08:08 AM
Thank you very much.

joh6nn
08-13-2002, 09:12 AM
or, you might try .htaccess files, if you have access to them. if you don't know if you can use them, ask your sysadmin.

here's a tutorial on how you could use them for this:
http://www.javascriptkit.com/howto/htaccess.shtm
http://www.javascriptkit.com/howto/htaccess7.shtml

murphyz
08-13-2002, 02:59 PM
If your links already link to a page you will be using in the future, you could just put this into your <head> tags </head>:
<Meta http-equiv="Refresh" content="1; URL=http://www.addressgoeshere.com">

And that will redirect that page to wherever. Content="1 is the amount of seconds before redirecting.

When the pages are ready just remove the above code and the referring link stays on the page.

Mxx