How can I send a variable I've dynamically set in PHP to my htaccess file?
I'm making a forum, and instead of having /forum/thread/1.htm like I do now, I want to be able to fetch the post title and put that as the URL, so it would be /forum/thread/title-of-thread.htm like vBulletin.
I know it's possible, I've just messed around so much I can't get it. Here's what I have now. This is what gives you /forum/thread/1 (thread.php?threadID=1).
Code:
RewriteRule ^([0-9]+)(|.(htm(.*)|php|cgi|thread|post|topic))$ thread.php?threadID=$1
With a few added stuff, like /forum/thread/1.topic or 1.post. For those of you who don't get that, here.
Code:
RewriteRule ^(.*).html$ thread.php?threadID=$1
*Simplified
Any help it appreciated!
Thanks,
-PG
|