conh1
Registered Member
- Jul 27, 2021
- 77
- 44
Quick question for anyone that might know,
Looking to redirect a domain to a new site, but I want the homepage to redirect to a new page, while everything else redirects as normal on the new site.
For example
https://www.domain.com/ redirects to https://www.domain2.com/page/
But every other page redirects as usual:
https://www.domain.com/one-page/ to https://www.domain2.com/one-page/
https://www.domain.com/two-page/ to https://www.domain2.com/two-page/
https://www.domain.com/three-page/ to https://www.domain2.com/three-page/
etc
I had been using:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ https://example./$1 [L,R=301,NC]
But this doesn't seem to work for this specific case,
Thanks a lot
Looking to redirect a domain to a new site, but I want the homepage to redirect to a new page, while everything else redirects as normal on the new site.
For example
https://www.domain.com/ redirects to https://www.domain2.com/page/
But every other page redirects as usual:
https://www.domain.com/one-page/ to https://www.domain2.com/one-page/
https://www.domain.com/two-page/ to https://www.domain2.com/two-page/
https://www.domain.com/three-page/ to https://www.domain2.com/three-page/
etc
I had been using:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ https://example./$1 [L,R=301,NC]
But this doesn't seem to work for this specific case,
Thanks a lot