Quantcast
Browsing all 51 articles
Browse latest View live

Answer by object-Object for Redirect from an HTML page

You can do it in javascript:location = "url";

View Article


Answer by Paul Ogilvie for Redirect from an HTML page

As far as I understand them, all the methods I have seen so far for this question seem to add the old location to the history. To redirect the page, but do not have the old location in the history, I...

View Article


Answer by Vanquished Wombat for Redirect from an HTML page

This is a redirect solution with everything I wanted but could not find in a nice clean snippet to cut & paste. This snippet has a number of advantages: lets you catch and retain any querystring...

View Article

Answer by PoM for Redirect from an HTML page

<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Redirect to a page</title></head><body...

View Article

Answer by pat capozzi for Redirect from an HTML page

Just use the onload event of the body tag:<body onload="window.location = 'http://example.com/'">

View Article


Answer by Yash Jain for Redirect from an HTML page

You don't need any JavaScript code for this. Write this in the <head> section of the HTML page:<meta http-equiv="refresh" content="0; url=example.com" />As soon as the page loads at 0...

View Article

Answer by Vô Vị for Redirect from an HTML page

You can auto redirect by HTTP Status Code 301 or 302.For PHP:<?php Header("HTTP/1.1 301 Moved Permanently"); Header("Location: http://www.redirect-url.com");?>

View Article

Answer by JoshYates1980 for Redirect from an HTML page

Razor engine for a 5 second delay:<meta http-equiv="Refresh" content="5; url=@Url.Action("Search", "Home", new { id = @Model.UniqueKey }))">

View Article


Answer by Patartics Milán for Redirect from an HTML page

If you are looking forward to follow modern web standards, you should avoid plain HTML meta redirects. If you can not create server-side code, you should choose JavaScript redirect instead.To support...

View Article


Answer by Scotsman for Redirect from an HTML page

I found a problem while working with a jQuery Mobile application, where in some cases my Meta header tag wouldn't achieve a redirection properly (jQuery Mobile doesn't read headers automatically for...

View Article

Answer by kkk for Redirect from an HTML page

As soon as the page loads, the init function is fired and the page is redirected:<!DOCTYPE html><html><head><title>Example</title><script> function init() {...

View Article

Answer by Zolfaghari for Redirect from an HTML page

I use a script which redirects the user from index.html to relative url of Login Page<html><head><title>index.html</title></head><body...

View Article

Answer by RafaSashi for Redirect from an HTML page

This is a sum up of every previous answers plus an additional solution using HTTP Refresh Header via .htaccess1. HTTP Refresh HeaderFirst of all, you can use .htaccess to set a refresh header like...

View Article


Answer by P. BANERJEE for Redirect from an HTML page

The simple way which works for all types of pages is just to add a meta tag in the head:<html><head> ...<meta HTTP-EQUIV="REFRESH" content="seconds; url=your.full.url/path/filename">...

View Article

Answer by kriscross07 for Redirect from an HTML page

You should use JavaScript. Place the following code in your head tags:<script type="text/javascript"> window.location.assign("http://www.example.com")</script>

View Article


Answer by Edward for Redirect from an HTML page

Just for good measure:<?phpheader("Location: example@example.com", TRUE, 303);exit;?>Make sure there are no echo's above the script otherwise it will be...

View Article

Answer by Alex K for Redirect from an HTML page

It would be better to set up a 301 redirect. See the Google's Webmaster Tools article 301 redirects.

View Article


Answer by lrkwz for Redirect from an HTML page

I would also add a canonical link to help your SEO people:<link rel="canonical" href="http://www.example.com/product.php?item=swedish-fish"/>

View Article

Answer by Muhammad Saqib for Redirect from an HTML page

Place the following code between the <HEAD> and </HEAD> tags of your HTML code:<meta HTTP-EQUIV="REFRESH" content="0; url=http://example.com/index.html">The above HTML redirect code...

View Article

Answer by Sebi for Redirect from an HTML page

Put the following code in the <head> section:<meta http-equiv="refresh" content="0; url=http://address/">

View Article
Browsing all 51 articles
Browse latest View live