301 redirect help

Started by njtweb, October 11, 2019, 04:44:25 PM

Previous topic - Next topic

njtweb

Hi,

I had a topic get way out of control and wound up with a league sending me a threat to sue.

I moved the topic to my admin forum which is restricted to only me. I then created a new topic on the main forum advising, due to circumstances out of our control we were forced to remove the original topic.

Am I able to 301 redirect the original to the new topic advising its removed? As it currently stands when anybody clicks that link in google results they get a 403 forbidden.

This is what I wrote in my htaccess and it's not working.

Redirect 301 /index.php?topic=1333 https://www.mysite.com/index.php?topic=1354

Thank you to all in advance.

Pipke

you can do this without modifying htaccess

in Display.template.php

find

function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;


add after it

if ($context['current_topic'] === 1333)
redirectexit('topic=1354');
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

njtweb

Quote from: Pipke on October 12, 2019, 06:23:23 PM
you can do this without modifying htaccess

in Display.template.php

find

function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;


add after it

if ($context['current_topic'] === 1333)
redirectexit('topic=1354');


Thank you very much! :)

_sebas_

really this is like 301 ?

Advertisement: