| | |
vBulletin mod_rewrite
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2004
Posts: 12
Reputation:
Solved Threads: 0
I tried this and joined here after your post at seoforums. I need your help. There were a few changes from your vb 3.0.1 to vb 3.0.3.
I put the changs in that you states through your steps. First off thanks for the post and the mod, it is outstanding. I was wondering if you could help me! Is there anyway that you would be willing to look at my test forums and tell me what is wrong with what I did
Mike
http://www.sportsrant.com/testforums
this is what my htaccess file looks like!
I put the changs in that you states through your steps. First off thanks for the post and the mod, it is outstanding. I was wondering if you could help me! Is there anyway that you would be willing to look at my test forums and tell me what is wrong with what I did
Mike
http://www.sportsrant.com/testforums
this is what my htaccess file looks like!
•
•
•
•
RewriteEngine on
Options +FollowSymLinks
RewriteRule ^thread([0-9]+).html$ showthread.php?t=$1 [L]
RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?forumid=$1 [L]
•
•
Join Date: Aug 2004
Posts: 12
Reputation:
Solved Threads: 0
acutally ma'am i was able to get this to work! It works perfectly and this is an awesome modification. The only question that I have is
when you click on this link (example)
http://www.sportsrant.com/forums/new...hread3503.html
then it should go to that URL, instead is goes to the regular php post, but it goes to:
http://www.sportsrant.com/forums/sho...8619#post58619
Is there anyway to change that also!!
Mike
when you click on this link (example)
http://www.sportsrant.com/forums/new...hread3503.html
then it should go to that URL, instead is goes to the regular php post, but it goes to:
http://www.sportsrant.com/forums/sho...8619#post58619
Is there anyway to change that also!!
Mike
•
•
Join Date: Aug 2004
Posts: 12
Reputation:
Solved Threads: 0
I sent this email to another VB member here to see one problem with this tweak
he only thing that gets me about this is from the forums home page! (EXAMPLE)
This link here: http://www.sportsrant.com/forums/new...hread3501.html takes you to the latest thread like it should: http://www.sportsrant.com/forums/sho...8579#post58579 and I do not believe this is good for SEO! If you go into that forum, even on your site, and click on http://www.sportsrant.com/forums/thread3501.html which is the same post and actually goes to the thread. Do you understand where I am coming from! Can this be fixed or tweaked to work, there has to be away. It will make it even more SEO!!
he only thing that gets me about this is from the forums home page! (EXAMPLE)
This link here: http://www.sportsrant.com/forums/new...hread3501.html takes you to the latest thread like it should: http://www.sportsrant.com/forums/sho...8579#post58579 and I do not believe this is good for SEO! If you go into that forum, even on your site, and click on http://www.sportsrant.com/forums/thread3501.html which is the same post and actually goes to the thread. Do you understand where I am coming from! Can this be fixed or tweaked to work, there has to be away. It will make it even more SEO!!
The current way of doing things is where the links to newpostinthreadXXX.html and lastpostinthreadXXX.html redirect to their showthread.php? counterparts. The following mini-tutorial will fix that:
STEP ONE
Add the following line to your .htaccess file:
STEP TWO
All of the following changes need to be made to the showthread.php file:
should be replaced with
should be replaced with
should be replaced with
should be replaced with
should be replaced with
STEP ONE
Add the following line to your .htaccess file:
PHP Syntax (Toggle Plain Text)
RewriteRule ^post([0-9]+).html$ showthread.php?p=$1 [L]
STEP TWO
All of the following changes need to be made to the showthread.php file:
PHP Syntax (Toggle Plain Text)
exec_header_redirect("showthread.php?$session[sessionurl_js]p=$getlastpost[postid]$highlightwords#post$getlastpost[postid]");
PHP Syntax (Toggle Plain Text)
exec_header_redirect("post$getlastpost[postid].html#post$getlastpost[postid]");
PHP Syntax (Toggle Plain Text)
exec_header_redirect("showthread.php?$session[sessionurl_js]p=$posts[postid]$highlightwords#post$posts[postid]");
PHP Syntax (Toggle Plain Text)
exec_header_redirect("post$posts[postid].html#post$posts[postid]");
PHP Syntax (Toggle Plain Text)
exec_header_redirect("showthread.php?$session[sessionurl_js]t=$threadinfo[threadid]&goto=lastpost$highlightwords");
PHP Syntax (Toggle Plain Text)
exec_header_redirect("lastpostinthread$threadinfo[threadid].html");
PHP Syntax (Toggle Plain Text)
exec_header_redirect("showthread.php?$session[sessionurl_js]t=$thread[pollid]");
PHP Syntax (Toggle Plain Text)
exec_header_redirect("thread$thread[pollid].html");
PHP Syntax (Toggle Plain Text)
$firstunread = 'showthread.php?' . $session['sessionurl'] . 't=' . $threadid . '&goto=newpost';
PHP Syntax (Toggle Plain Text)
$firstunread = 'newpostinthread' . $threadid . '.html';
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Thank you so so much for your kind words. And thank you for your generous donation to DaniWeb, as well!
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Thanks!
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
•
•
Join Date: Aug 2004
Posts: 6
Reputation:
Solved Threads: 0
Just got it done on www.sgwebhostingtalk.com , after some editting here and there since it didnt work very smooth for me. But still thanks ALOT dani !
![]() |
Similar Threads
- [Revised] vBulletin Mod_rewrite Tutorial (PHP)
- vBulletin mod_rewrite for vB 3.0.7 (Existing Scripts)
- vBulletin mod_rewrite for vB 3.0.7 (Growing an Online Community)
- vBulletin mod_rewrite in phpBB mod format (Existing Scripts)
Other Threads in the PHP Forum
- Previous Thread: Help Needed
- Next Thread: mysql_num_rows warning
| Thread Tools | Search this Thread |
advanced ajax apache api array basics beginner binary broken cakephp check checkbox class cms code combobox cookies cron curl database date datepart display dynamic echo email error file files folder form forms function functions google head href htaccess html image include includingmysecondfileinthechain insert integration ip java javascript job joomla js limit link login loop mail menu mlm multiple mysql oop parse password paypal pdf php problem procedure query radio random recursion regex remote script search server sessions smarty smash sms soap source space sql stored syntax system table traffic tutorial unicode update upload url validator variable video web xml youtube








i have a problem >.<