I am planning to use the Redirection plugin to do redirects. The plugin’s description states that it also enables 302 redirects, but I can’t see how. There’s no option as such (see screenshot below).
Am I looking in the wrong place? Does anyone know how to do 302 redirects using Redirections plugin?
Considering that Redirection plugin is broken in parts, I am currently thinking of…
#1 Using Simple URLs plugin by StudioPress.
As fate would have it, the plugin does 301 redirects only. But luckily, to get it to do what I want (302 redirects), is as easy as replacing the two instances of
301
with302
in the plugin’splugin.php
file (line 152).* * * * *
#2 setting
wp_redirect
on posts using a custom field. This is the code I have in mind (untested) â based on this answer:* * * * *
#3 This is a completely non-WordPress way. It’s very simple, basic and straightforward.
First, create a directory called
go
(as inhttp://example.com/go/
) with an emptyindex.html
file in it. When you want to create a redirect, like sayhttp://example.com/go/wordpress/
, simply drop a directory (wordpress
in this case) with anindex.php
file with nothing but the following code, ingo
.That’s all.
http://example.com/go/wordpress/
should now redirect you tohttp://wordpress.org/
Coming a little late to the party here, but hopefully someone else will find this helpful.
I found I was able to change redirects to 302s using the Redirection plugin in the following manner:
BUT: This does not work if you choose the last option, matching “URL and login status”. This was what I wanted to do, so I could easily edit these pages while sending visitor traffic elsewhere. I decided that the 302 code was more important, and if I needed to see the pages while editing, I could use the preview link, e.g., “page_id=109&preview=true”.