Info
- 8 posts
- 4 voices
- Started 2 years ago by Michael3185
- Latest reply from Michael3185
- This topic is resolved
Topic slugs & numeric IDs
-
- Posted 2 years ago #
I don't fully grasp the relationship between 'slugs' and forum topics, and would appreciate a nod in the right direction.
I can see that when permalinks are set to None, the forum.php file is fed an ID and then grabs the topic(s). When I originally set up one of the forums I set the permalinks to Name based (pretty..?) and all worked fine. However, I moved the forum into a sub-folder, and changed the URI in the topicmeta DB table, so the forum index page appears in the browser. But, while I can navigate fine with permalinks set to None (ie., topics passed by number), it refuses to work when set to Name.
I realised this might be the slugs in the DB, and so tried removing one and switching permalinks off/on. It fails to find the topic page. If I set permalinks back to None, it works ok.
Am I right in assuming it's using the slugs for topic navigation? If so, is there a way of rebuilding the slugs so that they work within the new sub-folder? (And incidentally, why are they called 'slugs'..?)
-
- Posted 2 years ago #
When you run this query, does your old URI show up anywhere?
SELECT * FROM bb_topicmeta WHERE meta_key='uri'As for the word "slugs", I'm pretty sure it comes from typesetting. :-)
http://en.wikipedia.org/wiki/Slug_(typesetting) -
- Posted 2 years ago #
That's what I altered manually johnhiler, through my cPanel. I've just checked it, and it correctly points to the forum folder, so the index.php comes up fine. As I say, permalinks of None are fine, but Names aren't, even though they're in the tables.
I had this a few weeks ago with another forum, and setting the URI in the DB fixed it. I may just drop the DB and run the installer to sort it out, as there's nothing much there yet anyway.
-
- Posted 2 years ago #
Sounds like there is a conflict between .htaccess files now that the forum is in a subfolder after being moved. Did you update your .htaccess rules for the new folder you installed the forum in?
-
- Posted 2 years ago #
Ah, that I haven't. I copied it into the folder. Mind you, it doesn't seem to have anything defined in it which points to the old path. Here's the content;
Options -MultiViews <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^pm/?(.*)$ /my-plugins/bbpm/index.php? [L] RewriteRule ^page/([0-9]+)/?$ /index.php?page= [L,QSA] RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /forum.php?id=&page= [L,QSA] RewriteRule ^forum/([^/]+)/?$ /forum.php?id= [L,QSA] RewriteRule ^forum/?$ / [R=302,L,QSA] RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /topic.php?id=&page= [L,QSA] RewriteRule ^topic/([^/]+)/?$ /topic.php?id= [L,QSA] RewriteRule ^topic/?$ / [R=302,L,QSA] RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ /tags.php?tag=&page= [L,QSA] RewriteRule ^tags/([^/]+)/?$ /tags.php?tag= [L,QSA] RewriteRule ^tags/?$ /tags.php [L,QSA] RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ /profile.php?id=&page= [L,QSA] RewriteRule ^profile/([^/]+)/([^/]+)/?$ /profile.php?id=&tab= [L,QSA] RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /profile.php?id=&tab=&page= [L,QSA] RewriteRule ^profile/([^/]+)/?$ /profile.php?id= [L,QSA] RewriteRule ^profile/?$ /profile.php [L,QSA] RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /view.php?view=&page= [L,QSA] RewriteRule ^view/([^/]+)/?$ /view.php?view= [L,QSA] RewriteRule ^rss/?$ /rss.php [L,QSA] RewriteRule ^rss/topics/?$ /rss.php?topics=1 [L,QSA] RewriteRule ^rss/forum/([^/]+)/?$ /rss.php?forum= [L,QSA] RewriteRule ^rss/forum/([^/]+)/topics/?$ /rss.php?forum=&topics=1 [L,QSA] RewriteRule ^rss/topic/([^/]+)/?$ /rss.php?topic= [L,QSA] RewriteRule ^rss/tags/([^/]+)/?$ /rss.php?tag= [L,QSA] RewriteRule ^rss/tags/([^/]+)/topics/?$ /rss.php?tag=&topics=1 [L,QSA] RewriteRule ^rss/profile/([^/]+)/?$ /rss.php?profile= [L,QSA] RewriteRule ^rss/view/([^/]+)/?$ /rss.php?view= [L,QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ /index.php [L] </IfModule>I have no idea what any of it does!
-
- Posted 2 years ago #
I am guessing you need to change your
RewriteBase
from
RewriteBase /
to
RewriteBase /forum/where forum is the name of your subfolder.
-
- Posted 2 years ago #
You don't have to, and shouldn't really edit the slugs in the database ever.
-
- Posted 2 years ago #
I just moved it all back out of the sub-folder, and everything's fine now. For some reasons a new install wouldn't work in the sub-folder either, but no matter. Thanks guys.
-
You must log in to post.