Jump to content
xisto Community
Sign in to follow this  
iGuest

Redirect entire website

Recommended Posts

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

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

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

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

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 :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.