iGuest 3 Report post Posted February 13, 2005 hey there,Is it possible to redirect an entire website (all pages) to another host rather than just on one page? Eg, not just http://freehost.com/ to redirect to http://forums.xisto.com/no_longer_exists/, but all pages from http://freehost.com/ (main.php, contacts.php, etc) to another host.So that if someone visits any of the pages from my old site, they will be redirected to the main page of my new hosted site..know wot i mean..?Thnx. Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 13, 2005 you mean you want to link your new website http://new.com/ to http://www.old.com/?or'>http://www.old.com/?or do you mean that all the pages of http://www.old.com/ will also apear on http://new.com/ beside the new pages? Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 13, 2005 yeh sumthing like that, i want all the pages from http://www.old.com/ to automaticaly redirect to the main page of the http://new.com/ .. is that possible? Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 14, 2005 Delete/move the old site and edit/create an .htaccess file, there add the directive [if the host is using Apache]:redirect 301 / http://www.newsite.com/ Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 19, 2005 ohhh Cheers mate!! worked perfectly!! Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 23, 2005 Since this is in the php scripting section, thouht i might add the php script for that <?phpheader("Location: yoursite.com");?>copy and paste that into a into notepad and then save it as index.php and upload it.obviously where is says "yoursite.com' you put where you want it to forward to. Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 23, 2005 He wants to redirect the access to _any_ file on the old site, with that method he would have to put that code on every page... Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 26, 2005 you can also use the cpanel x redirect thing Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 27, 2005 oh, like this . Thanks ! Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 27, 2005 Delete/move the old site and edit/create an .htaccess file, there add the directive [if the host is using Apache]:redirect 301 /http://www.newsite.com/ How do you create a .htaccess file? Type it up in notepad and change the extension? And where do you put the file? Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 27, 2005 Yep, you can use notepad, save it as ".htaccess" including the quotes in the file name. You can put a .htaccess file in any folder [usually in public_html], the directives will affect to that folder and its sub-folders. If you are using FNH, you should have a .htaccess file already, edit that one. Share this post Link to post Share on other sites
iGuest 3 Report post Posted March 4, 2005 If you get the list of files there are on the other server ... then just put in all files this:<?include "thefile"?>or something like that Share this post Link to post Share on other sites