Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted April 29, 20168 yr Is there was way in htaccess maybe to strip/hide the database numbers of forums? Example: https://invisionpower.com/forums/forum/505-product-guidance/ becomes: https://invisionpower.com/forums/forum/product-guidance/ It does not work in Friendly URLs, it still needs the ID. Figured something in htaccess could strip or hide it. Thanks
April 29, 20168 yr 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?
April 29, 20168 yr Author Yeah, lol. Call it OCD I guess. I like them orderly and not 886 and 2. But hey, who really cares right? Thanks for posting that.
Archived
This topic is now archived and is closed to further replies.