The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How can I get the threadid?
I'm trying to change the URL's for forums and threads in an effort to make them more friendly to search engines like Google. I know there are several hacks with a rather different way of doing this, but I'm giving this method a shot. Right now I'm working on displaying threads by changing the normal URL (http://www.domain.com/forum/showthread.php?s=&threadid=123) to the new one (http://www.domain.com/forum/thread/123). I've almost got it working - here's what I've done so far:
- - - - - - - - - - 1. Created a copy of showthread.php and named the new file simply "thread" without any extension. 2. I then uploaded a .htaccess file in my forum directory containing the following (which will cause Apache to read the new "thread" file as a PHP script). Code:
<Files thread> ForceType application/x-httpd-php </Files> Code:
<?php error_reporting(7); $url_array=explode("/",$PATH_INFO); $threadid=$url_array; $action = $HTTP_GET_VARS['action']; $goto = $HTTP_GET_VARS['goto']; if ( isset($goto) and ($goto=='lastpost' or $goto=='newpost')) { $noheader=1; } After I perform the modifications above, I am able view a thread by using the new URL (http://www.domain.com/forum/thread/123). However, it will *only* show me the first thread on the forum (with a threadid of 1). I know the problem lies in the $threadid=$url_array; line, but I don't know what to change it to to fix it so that it will display whatever threadid number I specify in the URL. How should I change that line to achieve the desired effect? |
#2
|
||||
|
||||
Have you had a look at fastforward's hack? It's quite effective. Also, go to vbulletin.com and have a look at filburt1's non-hack solution. Both use .htaccess to remap the path.
|
#3
|
||||
|
||||
I was scared away from fastforward's hack, but I just now discovered filburt's. But, alas, his version is giving me trouble, too! Please take a look at my problem if you get a chance.
|
#4
|
||||
|
||||
You need to get your host to allow you to edit .htaccess files on your server - your host has protected that file.
|
#5
|
||||
|
||||
Oh, it is on my own dedicated server, so that shouldn't be a problem. Where can I edit those .htaccess permissions? But, come to think of it, I've never had this problem with .htaccess files before, so it might be something else.
|
#6
|
||||
|
||||
Ah, never mind, I figured out my problem!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|