Error with 301 redirect to another domain

Morning everyone.

I will need some help, as although I do have experience from other hosting services and creating redirects in htaccess files, here I cannot accomplish the redirection to a specific page of another domain that I own.

So the source domain that is hosted here is : mojointeriors co uk

And I have 3 requests:

  1. the main domain to be 301 to https://www.blackbeetledesign com/mojo-interiors/
  2. all or specific pages of the mojointeriors domain (for example mojointeriors co uk/uk/example html) to be 301 to https://www.blackbeetledesign com/mojo-interiors/
  3. all above to work for www and non www pages

I have first tried to do it through the Control Panel and the Redirect sections, but it doesn’t seem to work.

Then I added this code to the htdocs/.htaccess file:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?mojointeriors.co.uk$ [NC]
RewriteRule ^(uk/deco-side-table-light-p-606.htmluk/deco-side-table-light-p-606.html/|expiredpage2/|expiredpage3/)?$ Our Inspirations: Mojo Interiors | Black Beetle Design [R=301,L]

But still doesn’t seem to work.

Hi,

as I have mentioned I want to redirect the whole domain, but also any pages under this domain.
Do you have a specific solution for that?

Your domain is already redirecting to the new domain

1 Like

Hmm, I have checked through this site redirect-checker.org and I see no redirects at all.
How did you see this?

Try clearing cache or using another browser

2 Likes

Shouldn’t this have a preceding slash? And a few more pipe characters? So:

RewriteRule ^/(uk/deco-side-table-light-p-606.html|uk/deco-side-table-light-p-606.html/|expiredpage2/|expiredpage3/)?$ [https://www.blackbeetledesign.com/mojo-interiors/?utm_source=redirect&utm_medium=301&utm_campaign=Mojo ](https://www.blackbeetledesign.com/mojo-interiors/?utm_source=redirect&utm_medium=301&utm_campaign=Mojo) [R=301,L]

It’s probably blocked by this:

It’s better to use a regular web browser to test this instead.

3 Likes

Well according to this site, there is no / before the domain.

Please, if you use the redirect tool, don’t make a error with redirecting to the https version because you can end up with an infinite redirect loop. :sweat_smile:

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.