To fix incorrect links

Board rules and such. Read before posting.
Post Reply
User avatar
MacG
Posts: 1128
Joined: Mon Aug 15, 2011 1:19 pm
Location: Dresden, Germany

To fix incorrect links

Post by MacG »

If you search via Google, you might find a link to our forum ttnut.com. But the link doesn't work. Because it is from the old version of the forum PHP-software. Or you have linked to another topic in one of your older posts.

Here is a workaround to fix this:

https://www.ttnut.com/scale-rails-0-6-0-t338.html <- the old version / Google search results

the "t338" stands for the number of the topic and you have to add it to "https://www.ttnut.com/viewtopic.php?"

https://www.ttnut.com/viewtopic.php?t=338 <- the new version

User avatar
ConducTTor
Site Admin
Posts: 8826
Joined: Sat May 23, 2009 4:52 pm
Location: Atlanta GA USA
Contact:

Re: To fix incorrect links

Post by ConducTTor »

Yeah. This. This along with the no longer functioning gallery are the biggest problems with the new software. The URL rewriting mechanism is borked.
My website: https://www.ttnut.com
It's the website you're already on. But if you want to be even more on it, click the link.

User avatar
MacG
Posts: 1128
Joined: Mon Aug 15, 2011 1:19 pm
Location: Dresden, Germany

Re: To fix incorrect links

Post by MacG »

Sad that there isn't a setting for the format of a generated link. By WordPress, there is one.

One possible way would be using the .htaccess file

Code: Select all

RewriteEngine on
RewriteRule ^(.*)-t([0-9]+).html  /viewtopic.php?t=$2 [NC]
But I'm not familiar with it. The placeholder "(.*)" should be correct, but returns a stored value. Therefore I use "$2" at the end for the second value. Maybe you just can leave out the bracket at "(.*)". I don't know. I hope it helps you a little further.

User avatar
ConducTTor
Site Admin
Posts: 8826
Joined: Sat May 23, 2009 4:52 pm
Location: Atlanta GA USA
Contact:

Re: To fix incorrect links

Post by ConducTTor »

Yup, the .htaccess file is the way to do it and it's what I will eventually end up doing.
My website: https://www.ttnut.com
It's the website you're already on. But if you want to be even more on it, click the link.

User avatar
MacG
Posts: 1128
Joined: Mon Aug 15, 2011 1:19 pm
Location: Dresden, Germany

Re: To fix incorrect links

Post by MacG »

If you have used an SEO plugin at the old version, it should already be in the .htaccess like this or similar. Maybe you only have to change the syntax for the new version.
Lok-n-Roll.de - we send worldwide :wink:

User avatar
ConducTTor
Site Admin
Posts: 8826
Joined: Sat May 23, 2009 4:52 pm
Location: Atlanta GA USA
Contact:

Re: To fix incorrect links

Post by ConducTTor »

MacG wrote:
Sat Aug 08, 2020 9:07 am
If you have used an SEO plugin at the old version, it should already be in the .htaccess like this or similar. Maybe you only have to change the syntax for the new version.
Exactly. I need to go through the old version of htaccess and harvest the useful parts. I'm still waiting to see if a new version of the URL rewriter will become available so it can do all the new URLs as well.
My website: https://www.ttnut.com
It's the website you're already on. But if you want to be even more on it, click the link.

User avatar
MacG
Posts: 1128
Joined: Mon Aug 15, 2011 1:19 pm
Location: Dresden, Germany

Re: To fix incorrect links

Post by MacG »

The problems with Google search results decrease. Since Google deletes the unobtainable results all slowly.
Lok-n-Roll.de - we send worldwide :wink:

Post Reply

Return to “About The Board”