Jump to content

Hide mysql forum numbers in URLs?


chilihead

Recommended Posts

Posted
1 hour ago, chilihead said:

It does not work in Friendly URLs, it still needs the ID.

Thanks

Correct - how would you expect the software to know which forum you are looking for, seeing as the number is the id for the forum? Before you answer, keep the following in mind:

1) The name of the forum is there....yes. But what happens if you change it at a later point? Invalid urls to be dealt with and redirected.

2) The name of the forum is there...yes. How does the software determine the id? It does an additional SQL query based on the name of the forum to just get the id.

As for the htaccess.....look into rewrites. The following probably does it (probably = I'm not testing it for you)

RewriteEngine on
RewriteCond %{REQUEST_URI} /forums/forum/product-guidance/$
RewriteRule .* /forums/forum/505-product-guidance/ [L]

So then you've done that, and you repeat it for all your other forums, and you keep it manually up to date as you add/remove forums. And then you then have to modify your theme to not include those id numbers in the internal urls. What the heck....might as well remove them from the topic urls too ;)

Then you sit back and think - is it really worth it? ;)

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...