2023-10-15, 10:36 AM
Hello. I wanted to edit the topic link addresses to forum.com/tid-tname. For this, I made some changes to my .htaccess file.
Later, when I tried to enter the page, I noticed that it still redirected me to forum.com/threads-37.html. So I was constantly redirected to the 404 page.
When I wrote the topic link manually (forum.com/37-this-test-topic.html), I was able to access the topic. This means .htaccess redirect is working. However, when I clicked on the thread in the forum, this did not work and it tried to take me to forum.com/threads-37.html.
I looked at how the link was written in the forumdisplay_thread template. Link is written as {$thread['threadlink']}. Wherever this information comes from, I think I need to edit it. Can you help me?
I'm sorry for my bad english. I use translation.
RewriteRule ^([0-9]+)-([A-Za-z0-9-]+)\.html$ showthread.php?tid=$1 [L,QSA]
RewriteRule ^([0-9]+)-([A-Za-z0-9-]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
RewriteRule ^([0-9]+)-([A-Za-z0-9-]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
RewriteRule ^([0-9]+)-([A-Za-z0-9-]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
RewriteRule ^([0-9]+)-([A-Za-z0-9-]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
RewriteRule ^([0-9]+)-([A-Za-z0-9-]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
RewriteRule ^([0-9]+)-([A-Za-z0-9-]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]
Later, when I tried to enter the page, I noticed that it still redirected me to forum.com/threads-37.html. So I was constantly redirected to the 404 page.
When I wrote the topic link manually (forum.com/37-this-test-topic.html), I was able to access the topic. This means .htaccess redirect is working. However, when I clicked on the thread in the forum, this did not work and it tried to take me to forum.com/threads-37.html.
I looked at how the link was written in the forumdisplay_thread template. Link is written as {$thread['threadlink']}. Wherever this information comes from, I think I need to edit it. Can you help me?
I'm sorry for my bad english. I use translation.