Conversation
supportCan I also use this plugin to create 307 redirects, or only 301 and 302? https://wordpress.org/plugins/redirect-list/
At this time only 301 or 302 redirects, unless you modify the plugin.
Closed
Thanks for the reminder 🙂 OK, I tried modifying the plugin like this (lines 52-54): ` echo ‘<div data-idx=”‘.$i.'”><input type=”text” name=”sf_red[‘.$i.’][0]” value=”‘.$red[$i][0].'” style=”width:300px;”><span> » </span><input type=”text” name=”sf_red[‘.$i.’][1]” value=”‘.$red[$i][1].'” style=”width:300px;”><select name=”sf_red[‘.$i.’][2]”><option value=”1″‘.($red[$i][2]==’1′?’ selected=”selected”‘:”).’>301 permanent</option><option value=”2″‘.($red[$i][2]==’2′?’ selected=”selected”‘:”).’>302 temporary</option><option value=”3″‘.($red[$i][3]==’3′?’ selected=”selected”‘:”).’>307 temporary</option><select></div>’; echo ‘<div data-idx=”‘.$i.'”><input type=”text” name=”sf_red[‘.$i.’][0]” onchange=”if (this.value) sf_red_add();” placeholder=”url-to-match” style=”width:300px;”><span> » </span><input type=”text” name=”sf_red[‘.$i.’][1]” placeholder=”destination-url” style=”width:300px;”><select name=”sf_red[‘.$i.’][2]”><option value=”1″>301 permanent</option><option value=”2″>302 temporary</option><option value=”3″>307 temporary</option><select></div>’ ` Unfortunately upon importing the CSV, all the 307 redirects still show as 302. I’m not a coder, though…
Hi, this is what you need: line 52: echo '<div data-idx="'.$i.'"><input type="text" name="sf_red['.$i.'][0]" value="'.$red[$i][0].'" style="width:300px;"><span> » </span><input type="text" name="sf_red['.$i.'][1]" value="'.$red[$i][1].'" style="width:300px;"><select name="sf_red['.$i.'][2]"><option value="1"'.($red[$i][2]=='1'?' selected="selected"':'').'>301 permanent</option><option value="2"'.($red[$i][2]=='2'?' selected="selected"':'').'>302 temporary</option><option value="7"'.($red[$i][2]=='7'?' selected="selected"':'').'>307 temporary</option><select></div>'; line 53: echo '<div data-idx="'.$i.'"><input type="text" name="sf_red['.$i.'][0]" onchange="if (this.value) sf_red_add();" placeholder="url-to-match" style="width:300px;"><span> » </span><input type="text" name="sf_red['.$i.'][1]" placeholder="destination-url" style="width:300px;"><select name="sf_red['.$i.'][2]"><option value="1">301 permanent</option><option value="2">302 temporary</option><option value="7">307 temporary</option><select></div>'
Thank you, that worked perfectly! Would you consider including this 307 tweak in upcoming versions?
I will include these modifications to support 307 redirects with the next version.
At this time only 301 or 302 redirects, unless you modify the plugin.
Closed
Thanks for the reminder 🙂 OK, I tried modifying the plugin like this (lines 52-54): ` echo ‘<div data-idx=”‘.$i.'”><input type=”text” name=”sf_red[‘.$i.’][0]” value=”‘.$red[$i][0].'” style=”width:300px;”><span> » </span><input type=”text” name=”sf_red[‘.$i.’][1]” value=”‘.$red[$i][1].'” style=”width:300px;”><select name=”sf_red[‘.$i.’][2]”><option value=”1″‘.($red[$i][2]==’1′?’ selected=”selected”‘:”).’>301 permanent</option><option value=”2″‘.($red[$i][2]==’2′?’ selected=”selected”‘:”).’>302 temporary</option><option value=”3″‘.($red[$i][3]==’3′?’ selected=”selected”‘:”).’>307 temporary</option><select></div>’; echo ‘<div data-idx=”‘.$i.'”><input type=”text” name=”sf_red[‘.$i.’][0]” onchange=”if (this.value) sf_red_add();” placeholder=”url-to-match” style=”width:300px;”><span> » </span><input type=”text” name=”sf_red[‘.$i.’][1]” placeholder=”destination-url” style=”width:300px;”><select name=”sf_red[‘.$i.’][2]”><option value=”1″>301 permanent</option><option value=”2″>302 temporary</option><option value=”3″>307 temporary</option><select></div>’ ` Unfortunately upon importing the CSV, all the 307 redirects still show as 302. I’m not a coder, though…
Hi, this is what you need: line 52: echo '<div data-idx="'.$i.'"><input type="text" name="sf_red['.$i.'][0]" value="'.$red[$i][0].'" style="width:300px;"><span> » </span><input type="text" name="sf_red['.$i.'][1]" value="'.$red[$i][1].'" style="width:300px;"><select name="sf_red['.$i.'][2]"><option value="1"'.($red[$i][2]=='1'?' selected="selected"':'').'>301 permanent</option><option value="2"'.($red[$i][2]=='2'?' selected="selected"':'').'>302 temporary</option><option value="7"'.($red[$i][2]=='7'?' selected="selected"':'').'>307 temporary</option><select></div>'; line 53: echo '<div data-idx="'.$i.'"><input type="text" name="sf_red['.$i.'][0]" onchange="if (this.value) sf_red_add();" placeholder="url-to-match" style="width:300px;"><span> » </span><input type="text" name="sf_red['.$i.'][1]" placeholder="destination-url" style="width:300px;"><select name="sf_red['.$i.'][2]"><option value="1">301 permanent</option><option value="2">302 temporary</option><option value="7">307 temporary</option><select></div>'
Thank you, that worked perfectly! Would you consider including this 307 tweak in upcoming versions?
I will include these modifications to support 307 redirects with the next version.