| Author |
Help with Jscript
|
gowtham potter
Greenhorn
Joined: Nov 02, 2010
Posts: 27
|
|
I want to write a javascript that redirects the user from my old-blog to new blog.
i used
<script type="text/javascript">
<!--
window.location = "http://hackershaven.wordpress.com/"
//-->
</script>
but if the user redirects from a specific post then i want it to go to that same post on the new blog
eg:-
if the user goes to http://gowtham1.co.cc/heloo.html then it must go to http://hackershaven.wordpress.com/heloo.html.
What should i do?
|
hai visit my website http://hacktohell.blogspot.com
for tech tips & tricks
|
 |
Christian Johansen
author
Ranch Hand
Joined: Oct 03, 2010
Posts: 46
|
|
The best way to do redirects is on the server. You should make sure to send a 301 Moved Permanently, so spiders also get updated. With Apache you can do this like so:
You _really_ should do this on the server. To answer your original question, this is one way to do it, but I don't recommend it:
|
 |
gowtham potter
Greenhorn
Joined: Nov 02, 2010
Posts: 27
|
|
Thank You!
Worked like a charm!
|
 |
 |
|
|
subject: Help with Jscript
|
|
|