| | |
vBulletin mod_rewrite
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
•
•
Originally Posted by Ted S
I really liked the idea of the titles in the url so I played aroung with modrewite and came up with this:
[php]RewriteRule ^/f([0-9]+)-(.*)\.html$ /forumdisplay.php?forumid=$1 [L][/php]
This tells modrewrite to forward any url fXID-XTEXT-.html to the forumdisplay.php?forumid=$XID url, this way you can have any text you want but since the ID is used in the URL, it is possible to use one rewrite rule for every forum.
To go along with this, you need to modify your forumbit templates to use the link
[php]<a href="f$forum[forumid]-$forum[url].html">[/php]
No files need to be changed as far as I can recall.
So far I am testing this on a template that my users don't access so please confirm this works for you before putting it on a live site.
Thanks for the wonderful hack, I had limited spidering in the past and it worked wonders so I can only expect even better results from this deep spidering system.
how can I use "titles in urls" for topics? Can you say me that? I have use it in my IPB and it's very sexy. :cheesy:
Thanks
•
•
Join Date: Oct 2004
Posts: 15
Reputation:
Solved Threads: 0
i have this running on my site, thanks for the great hack
•
•
Join Date: Dec 2004
Posts: 4
Reputation:
Solved Threads: 0
Sorry to be a pain but I would love this hack to work but I have obviously done something wrong
the forums come up correctly but I get a 404 error on every page. I have redone the hack from start three times now but the same thing always happens
You can see at www.forums.ic-games.co.uk
Any idea whats up? I have tried to read as much of this thread as I can put its getting on 12 pages and I may have missed something.
Any help appreciated
the forums come up correctly but I get a 404 error on every page. I have redone the hack from start three times now but the same thing always happens
You can see at www.forums.ic-games.co.uk
Any idea whats up? I have tried to read as much of this thread as I can put its getting on 12 pages and I may have missed something.
Any help appreciated
•
•
Join Date: Dec 2004
Posts: 5
Reputation:
Solved Threads: 0
I have vbulletin 3.0.3.
I was looking at the instructions that you outlined in the first message of the thread. You stated to edit forumhome_forumbit_level1_nopost and use the following line:
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">
I looked at this file and it already contained this line. I have never edited this template before. Is your hack recommended for version 3.0.3?
I was looking at the instructions that you outlined in the first message of the thread. You stated to edit forumhome_forumbit_level1_nopost and use the following line:
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">
I looked at this file and it already contained this line. I have never edited this template before. Is your hack recommended for version 3.0.3?
Yes, it works for any version of vBulletin. I think that you musunderstood the instructions. It says to edit forumhome_forumbit_level1_nopost and FIND that line ... which apparently you did, and to replace it with something else.
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: Dec 2004
Posts: 5
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by cscgal
Yes, it works for any version of vBulletin. I think that you musunderstood the instructions. It says to edit forumhome_forumbit_level1_nopost and FIND that line ... which apparently you did, and to replace it with something else.
1) Is it possible to give me an example of what I may replace that line with?
2) It looks like this thread is quite long. Are all of the suggested hacks in the first message of this thread?
•
•
Join Date: Dec 2004
Posts: 31
Reputation:
Solved Threads: 0
Sorry to sound dumb here, but which mod works?
In other words do I follow the orignal, or the second one cscgal started? The one TedS did or do I combine the two?
My forum is new, and with no visitors to speak of now is a good time to get in and customise it, but errr I'm not sure which one I should do.
In other words do I follow the orignal, or the second one cscgal started? The one TedS did or do I combine the two?
My forum is new, and with no visitors to speak of now is a good time to get in and customise it, but errr I'm not sure which one I should do.
![]() |
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 (Social Media and Online Communities)
- 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
Views: 91764 | Replies: 238
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email encode error file files folder form forms function functions google howtowriteathesis href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple multipletables mysql oop parse paypal pdf php problem provider query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table template tutorial update updates upload url validation validator variable video web xml youtube






