![]() |
Gimme till tomorrow night and I'll redo the hack based on the 2.02 code and post full instructions. I'll use the 'double rewrite' method that porfiry contributed to avoid changing a bazillion templates :)
ThomasP: The /f12 bits are created by editing the templates. All the rewrite does is change those short urls back to something that the vB php code knows about. |
oops, my bad - I see.
Thanks for your help and take your time, -Tom |
I finally got it to work by taking out the extra "/" from the first 2 lines, wooohooo!!!:D
Now I face smaller, yet another problem. Take this page for example: http://www.automotiveforums.com/vbulletin/t4667.html The 2nd page of the thread will not be indexed by search engines :( How can I use mod_rewrite to make the 2nd page be http://www.automotiveforums.com/vbulletin/t4667-2.html 3rd page: http://www.automotiveforums.com/vbulletin/t4667-3.html... etc? Thanks for any help. |
Well, I've done it!:D
http://www.automotiveforums.com/vbulletin/t4667.html And click on page 2, 3, and 4 ;) Thread [ << < 1 2 3 4 > >> ] If there's anybody that wants the rewrite code for this I'll post it, it was easier than I thought, after twisting my head for 2 hours. |
Quote:
Mine appears to be working on IE, but I haven't tried every possible scenario and I haven't tested it on Netscape. It handles multipage threads, but I still need to add support for multi-page threadlistings. Once complete, you should be able to block spiders from all dynamic urls and still have them index ALL posts. If anyone wants to help debug it, here it is: ---------------------------------------------- 1) Edit /etc/httpd.conf httpd.conf needs editing to enable and configure mod_rewrite. Here's all the relevent bits from my httpd.conf. It can go anywhere between the <VirtualHost> & </VirtualHost> tags. RewriteEngine on RewriteRule ^/f([0-9]+)/s([^/]+?)$ /forumdisplay.php?forumid=$1&s=$2 [L] RewriteRule ^/t([0-9]+)/s([^/]+?)\.html$ /showthread.php?threadid=$1&s=$2 [L] RewriteRule ^/s([^/])+?/$ /index.php?s=$1 [L] 2) Edit Templates a. The following templates contain the forum links that need changing (one occurance in each) -> forumdisplay_forumbit_level1_nopost -> forumdisplay_forumbit_level1_post -> forumdisplay_forumbit_level2_nopost -> forumdisplay_forumbit_level2_post -> forumhome_forumbit_level1_nopost -> forumhome_forumbit_level1_post -> forumhome_forumbit_level2_nopost -> forumhome_forumbit_level2_post The new link should be: <a href="$bburl/f$forum[forumid]/">$forum[title]</a> b. The following template contains the thread link that needs changing: -> forumdisplaybit The new link should be: <a href="$bburl/t$thread[threadid].html">$thread[title]</a> c. The following templates contain the pagenav bits: -> forumdisplay_multipagenav_pagenumber Replace the link within this templatewith: $bburl/t$thread[threadid]-$acurpage.html -------------------------------------------------------------- |
This is what I added for the thread#-page#.html to work:
RewriteRule ^t([0-9]+)-([0-9]+)\.html$ showthread.php?threadid=$1&perpage=10&pagenumber=$ 2 [L] Then I had to modify functions.php You can find what to modify by finding the veriables that correspond to the page nav in the templates. |
Has anyone managed to get that working via .htaccess?
If mod_rewrite is enabled it works as well via .htaccess - right? At least that works on my account: thx, -Tom |
Quote:
|
where can I find the htaccess that you speak of, I mean I looked all over my account and could not find it...
|
Just create one...
|
All times are GMT. The time now is 12:51 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|