Simple 303 redirect not working, why? Urgent help please

Hi there, I have a live Zoom workshop working later and I realise that my participants aren’t getting to the right page, eek it’s an emergency, I wonder if you can spot what I’m doing wrong?

I’ve added this code to my htaccess file to create a permanent redirect, but it’s not working.
The code is as follows:

Redirect 301 /https://www.thearthouseoasis.com/online_art_classes/ https://www.thearthouseoasis.com/zoom_workshop

Am I missing something obvious? Any urgent help massively appreciated.

Can’t really tell what you have posted, need to mark it as pre- formatted text.

RewriteEngine on
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^online_art_classes/$ https://www.thearthouseoasis.com/zoom_workshop? [R=302,L]

If i understand what you want then the above should work.
I setit up as a 302, you shouldn’t use 301’s until after you’ve tested. I wouldn’t do a 301 if you every intend to use the old URL again. 301’s are permanent, have no expiry date and can be cached forever.

Thank you @teefers you are a star that works perfectly. I have 2 other pages which I tried to apply the same principle but it’s not working, can you advise?
This is what I have so far:

RewriteEngine on
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^/online_art_classes/drawing/$ https://www.thearthouseoasis.com/zoom_workshops/drawing/? [R=302,L]

Okay,

The first rewrite rule I gave above might be being invoked prior to second one. Apache directives (htaccess is a local directives file) are processed top down.

The sample you show looks like you have an extra / at the start of the from URI.

RewriteRule ^online_art_classes/drawing/$ https://www.thearthouseoasis.com/zoom_workshops/drawing/? [R=302,L]

But without knowing the full Old and New URLs for every one you want to redirect it’s hard to say for sure.

please mark your code when you post it here on the forum.

That includes htaccess rules and URLs.

Select the code and use the </> button. It makes it so much easier to copy and paste to help you.

Hi @teefers thank you so much for your help I so appreciate it. I’m still having trouble getting it to work. This is what I need:

old
https://www.thearthouseoasis.com/online_art_classes/watercolours/
to new
https://www.thearthouseoasis.com/zoom_workshops/watercolours/

Try this:

RewriteEngine on
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^online_art_classes/$ https://www.thearthouseoasis.com/zoom_workshop? [R=302,L]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^online_art_classes/watercolours/$ https://www.thearthouseoasis.com/zoom_workshops/watercolours/? [R=302,L]
1 Like

Thank you but no that didn’t work. I only have to copy paste into the htaccess and hit the ‘save and upload button’ right?

1 Like

It can depend on what else is in the htaccess file.

I just tested the above code by itself, with made with love tester and it works for both URLs.

ok yes I think my htaccess is a bit messy! Thank you I might delete the old stuff in my htaccess and start again.

The last redirect I need to sort is this one:
    https://www.thearthouseoasis.com/online_art_classes/drawing/
    to new
    https://www.thearthouseoasis.com/zoom_workshops/drawing/

Can you advise?

Try. Adding this:

RewriteCond %{QUERY_STRING} ^$
RewriteRule ^online_art_classes/drawing/$ https://www.thearthouseoasis.com/zoom_workshops/drawing/? [R=302,L]
2 Likes

That works perfectly! Thank you SO much for all your help on this :).

1 Like

To do simple redirects you don’t need to include the full path, just do this:

Redirect 301 /online_art_classes/drawing/ /zoom_workshops/drawing/

Here’s some more examples we use on the Realmac site, I’ve found this is the most straight forward way to do redirects :slight_smile:

Redirect 301 /rapidweaver/upgrade https://www.realmacsoftware.com/store/upgrade/
Redirect 301 /rapidweaver/manual https://help.realmacsoftware.com
Redirect 301 /register.html Realmac Store

1 Like

Thanks Dan, I just tried this with a few more redirects I need but have got into an utter mess.
Am going to leave site as is and people will have to work their way through it themselves.

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