snlildude87 0 Report post Posted October 5, 2005 I want to redirect all my traffic from one site to another domain name. Is this possible, and if so, would I do something like this:.htaccess code: redirect 302 / http://http://www.mynewdomain.com/ Thanks! Share this post Link to post Share on other sites
moldboy 0 Report post Posted October 5, 2005 Well, it seems to me that if you made your 404 error page so that it contined a javascript redirect that should do the trick. Share this post Link to post Share on other sites
Spectre 0 Report post Posted October 5, 2005 You have a couple of options, the simplest of which you have already mentioned (although I would recommend using a 301/permanent redirect over a 302/temporary equivalent). Note that you can use 'temp' or 'permanent' in place of the HTTP request codes. Also try looking up the RewriteRule (or mod_rewrite) Share this post Link to post Share on other sites
Spectre 0 Report post Posted October 5, 2005 Oh, you can also redirect access via PHP, using the header() function: // Permanent redirect:header('HTTP/1.1 301 Moved Permanently', true);header('Location: http://forums.xisto.com/no_longer_exists/ Temporary redirect (note that sending the 'Location' header automatically sends a 302 redirect unless it is explicitly overwritten, as it is above):header('Location: http://forums.xisto.com/no_longer_exists/;; Share this post Link to post Share on other sites
OpaQue 15 Report post Posted October 5, 2005 Cpanel gives you options for permanent and temporary redirect. Check it out at your Cpanel. Share this post Link to post Share on other sites
snlildude87 0 Report post Posted October 5, 2005 So basically, I could do it my way (stated in the first post) or I could write put headers into the pages that I want redirected?By the way, what's the difference between permanent and temporary? I mean, if you put it at permanent (301), then you can always edit the php file, right? Then isn't that temporary? Share this post Link to post Share on other sites
Spectre 0 Report post Posted October 6, 2005 The idea is that a temporary redirect indicates that the original page is going to be restored at some stage soon, and a permanent redirect means it's not coming back (or at least, won't be there for an extended period). For example, if you are doing site maitainance and don't want any of your pages viewed during the process, you might '302' them to, say, '/message.html' to inform them of this. But if you renamed your page from '/page.html' to '/otherpage.html', you might want to permanently redirect traffic from the former to the latter.Most search engines also treat 301 and 302 redirection very differently. If you change your site to another domain name, then it is generally a good idea to use permanent redirects to point to your new domain name, informing the search engine that your site has been moved. Share this post Link to post Share on other sites