Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to that if any body type old website url on address bar of browser and enter then my new website url will open.
So how could I manage this from code. I have HTML website.
Posted

<META HTTP-EQUIV="refresh" CONTENT="seconds;URL=the-other-url">

this will help in redirecting to new
 
Share this answer
 
Comments
Gaurav Kumar Gaur 4-Sep-13 7:50am    
After using this code, When I type my old url and enter then the address bar will show both url(old/new) but page didn't redirect.
me.ajaykumar 5-Sep-13 7:29am    
Please type in the exact tag you are using
Dholakiya Ankit 5-Sep-13 7:34am    
this will allow user to add seconds but if you don't want to show your website check my solution or you have to write like this in this solution
<META HTTP-EQUIV="refresh" CONTENT="0;URL=the-other-url">
now you have to do using javascript


before body tag in your html


do

JavaScript
window.location="your new site address"


regards....:)
 
Share this answer
 
v4
Comments
me.ajaykumar 5-Sep-13 7:29am    
this is an HTML web site
Dholakiya Ankit 5-Sep-13 7:31am    
oh very simple dude see my updated solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900