This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Someone knows apache2 rewrite_mod to help with old domain links ?  (Read 1178 times)

Barbz

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 48
    • View Profile
    • YHOOL
I don't think this issue is taken seriously, but I feel like it's very important to revive the old links from modcraft.superparanoid.de

We all have bookmarks that are now completely dead, there are tons of links on ac-web and several sites that link to the old modcraft which are now completely useless. In top of that, all the links from search engines are lost and it's very very very annoying and bad for the forum.

Here is my partial solution for apache2, if someone can help to make the rewrite rules or correct me if i'm wrong, then do not hesitate :

1) The domain "modcraft.superparanoid.de" needs a new A record in its DNS settings and has to point to your server IP address.

2)a) Then you have to create a second virtualhost file in apache2 similar to the "modcraft.io" one but with the name "modcraft.superparanoid.de"

b) You need to enable mod_rewrite module by typing this "a2en mod_rewrite"

c) In this virtualhost file, you need to create rewrite rules and here are the things I noticed :

http://modcraft.superparanoid.de/viewforum.php?f=103
---> http://www.modcraft.io/index.php?board=103.0

http://modcraft.superparanoid.de/viewtopic.php?t=9821=51800
---> http://www.modcraft.io/index.php?topic=9821.msg51800

Do you see a pattern ?

viewforum.php?f=103      ==========>       index.php?board=103.0
viewforum.php?f=      ==========>       index.php?board=
103   ======> 103.0

viewtopic.php?t=9821=51800    =============>   index.php?topic=9821.msg51800
viewtopic.php?t=             =================>       index.php?topic=
9821=51800        ==================>    9821.msg51800
view ====> index.php


--------- I hope it will be done at some point, I think it's a priority and maybe I am the only one.
But if you wait too long, you will lose all the SEO and direct links from google.

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Someone knows apache2 rewrite_mod to help with old domain links ?
« Reply #1 on: March 24, 2017, 10:43:02 am »
No worries about that SEO, we never did any :)
Other than that, we don't have DNS access afaik. The current redirect is a PHP with header 302, but I guess that's enough.

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: Someone knows apache2 rewrite_mod to help with old domain links ?
« Reply #2 on: March 24, 2017, 01:26:26 pm »
mod rewrite seams to be disabled there. So rules will not work.
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Someone knows apache2 rewrite_mod to help with old domain links ?
« Reply #3 on: March 24, 2017, 05:31:08 pm »
I hacked together two rules, which should work-ish for the links given above. Everything else is still todo. Steff, please continue on that.

Barbz

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 48
    • View Profile
    • YHOOL
Re: Someone knows apache2 rewrite_mod to help with old domain links ?
« Reply #4 on: March 24, 2017, 09:18:47 pm »
WOW Schlumpf ! It works for most links !! I just tried 10 bookmarks and they all work !!

Thanks a lot, I'm going to check other links if I find one not working !

Barbz

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 48
    • View Profile
    • YHOOL
Re: Someone knows apache2 rewrite_mod to help with old domain links ?
« Reply #5 on: April 11, 2017, 07:51:07 pm »
All the links inside posts are not working because instead of "modcraft.superparanoid.de" they are "modcraft.io". But since they still use the outdated forum address like this "viewtopic.php?t=9821=51800", the php redirection doesn't occur. It's mixed.

One solution would be to change all the links that were written inside posts in the database, either to revert to "modcraft.superparanoid.de" to make it work with the PHP redirections that Schlumpf made, or to change the pattern of the second part of the url to match the new pattern. Like this, but in the DATABASE :

viewtopic.php?t=9821=51800    =============>   index.php?topic=9821.msg51800