I had a wetpaint site that got hacked by some jerk, and is now unusable, so I had to make another site. Now I want to make it so anyone going on the OLD homepage is automatically redirected to the NEW homepage, so my members can find it. Help!
Four answers:
anonymous
2012-07-29 18:38:32 UTC
If hosting service is free, you will not be allowed to use an .htaccess file so add this to the top of your index file:
How to Redirect to a New Page with the Meta Refresh Tag: http://webdesign.about.com/od/metataglibraries/a/aa080300a.htm
How to Do a 301 Redirect: http://www.internetbasedmoms.com/seo/301-redirect.html
How to redirect a web page, the smart way: http://www.stevenhargrove.com/redirect-web-pages/
Redirects and SEO: http://www.allthingssem.com/redirects-and-seo/
Ron
MelodyFree
2012-07-29 14:34:36 UTC
1
Create a file named ".htaccess" in the root (top level) directory of your website. On Linux, use the command "touch .htaccess". On Windows, navigate to the root folder in Windows Explorer, right-click in the folder contents window and select "New | Text Document."
2
Open the .htaccess file in a text editor
3.
Add a new line using the following format. "301" is the code that will be sent to browsers and search engines that means "Moved permanently to a new location."
Replace "/oldpath/oldpage.html" with the path (from the root of your web site) and file name of the old page. Replace "/newpath/newpage.html" with the redirect destination.
4.
Save the .htaccess file
5.
Test the redirect by going to the old address in your web browser. If it works, your web browser will automatically load the new page
D4M
2012-07-30 05:00:06 UTC
header('Location: http://www.YourNewsSite.com/');
exit;
?>
alice
2012-07-29 14:27:44 UTC
dddgrr
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.