Does anyone know the code for a full 301 redirect?
eg. olddomain.com/* ( all pages) redirect to newdomain.com with different content.
![]() ![]() |
LennonNZ: http://www.howto301redirect.com/htaccess-redirect/
Software Engineer
(the practice of real science, engineering and management)
A.I. (Automation rebranded)
Gender Neutral
(a person who believes in equality and who does not believe in/use stereotypes. Examples such as gender, binary, nonbinary, male/female etc.)
...they/their/them...
TwoSeven: Are you trying to 'forward' to the new sites landing page, or 'redirect' to the site at its new location (including same content)?
Inphinity: If it's hosted on apache you could simply use mod rewrite to rewrite any url with oldcompany.com in it to newcompany.com's default page.
[code]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.oldcompany.com$ [OR]
RewriteCond %{HTTP_HOST} ^oldcompany.com$
RewriteRule ^(.*)$ http://www.newcompany.com/ [R=301,L]
[/code]
![]() ![]() |