4 Mar 2010 at 12:09 #1 tres tres Soldato Joined 16 Oct 2007 Posts 7,481 Location UK Hi all, A quick question - I want any requests for domain.co.uk to get redirected to another site, APART from domain.co.uk/specificfolder .htaccess the way forward? Thanks very much
Hi all, A quick question - I want any requests for domain.co.uk to get redirected to another site, APART from domain.co.uk/specificfolder .htaccess the way forward? Thanks very much
4 Mar 2010 at 12:19 #2 gord gord Soldato Joined 18 Oct 2003 Posts 19,415 Location Midlands I would say so, although coding for .htaccess goes way over my head so I've pretty much stolen every piece of .htaccess code I've ever used. Google for the code you want.
I would say so, although coding for .htaccess goes way over my head so I've pretty much stolen every piece of .htaccess code I've ever used. Google for the code you want.
4 Mar 2010 at 16:58 #3 tres tres Soldato OP Joined 16 Oct 2007 Posts 7,481 Location UK Thanks chief - I have googled, and it's somewhat daunting. Hoping someone might be able to assist in pointing me in the right direction
Thanks chief - I have googled, and it's somewhat daunting. Hoping someone might be able to assist in pointing me in the right direction
4 Mar 2010 at 17:12 #4 radderfire radderfire Soldato Joined 24 Sep 2007 Posts 5,602 I would say .htaccess is the way to go. Maybe try some of the developer forums like phpfreaks.com. Rgds
I would say .htaccess is the way to go. Maybe try some of the developer forums like phpfreaks.com. Rgds
4 Mar 2010 at 18:07 #5 Mr Blonde Mr Blonde Caporegime Joined 18 Oct 2002 Posts 30,946 Location Liverpool -> London My host says to do one of these : Redirect from olddomain.com to www.newdomain.com: RewriteEngine On RewriteCond %{HTTP_HOST} !newdomain.com$ [NC] RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301] This is useful when you use www.newdomain.com as your new domain name. If not - use the code below. Redirect from olddomain.com to newdomain.com: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !newdomain.com$ [NC] RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]
My host says to do one of these : Redirect from olddomain.com to www.newdomain.com: RewriteEngine On RewriteCond %{HTTP_HOST} !newdomain.com$ [NC] RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301] This is useful when you use www.newdomain.com as your new domain name. If not - use the code below. Redirect from olddomain.com to newdomain.com: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !newdomain.com$ [NC] RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]