The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vRewrite - SEOed URLs for vBulletin Details »» | |||||||||||||||||||||||||
About
vRewrite is an advance but simple system to rewrite vB's URLs. The rewrite system uses preg_match_all and str_replace to rewrite the URLs. It will rewrite any URLs that are dynamic ex: showthread.php?t= to /the-forum/title-of-the-forum-id.html. Why? SEs (Search Engines) rate results based on filename. Not only that, but most SEs give a "boost" to static URLs (what we do here) versus dynamic URLs. vRewrite accomplishes both of this, for all URLs that a search engine (or a guest) will see. Installation Please download vRewrite.zip and read install.html for more information on how to install it. Requirements vRewrite assumes that you are using Apache with the mod_rewrite module enabled, and running vBulletin 3.5.x. However, if you ask for support here on IIS' module or on vBulletin 3.0.x - I will be more then happy to assist you. Contributions I would like to thank Chroder and Cole for assisting me release vRewrite. I could not have released it if it wasn't for them. I would like to thank the following people/boards for helping beta test vRewrite and making it a better product. Gaming Ultimate, BP Gaming, NBS Designz Cyclez, Hosting-Talk and Forum University. Copyright I've spent many hours working and perfecting vRewrite. The only thing I ask you to do is if you use it, please keep the link back. If you wish to put it in your style instead, simply remove or comment out that line. However, if you use vRewrite you MUST link back. That is the only thing I ask. Known Issues There are no known issues with the latest release (1.0). Support / Issues If you have any problems or discover a bug please post here in this thread. I have also included my email in the install.html email for one-on-one support. The only thing I ask you is please do not post this email address publicly - it is my personal email. Changelog 1.5 Release - vRewrite 1.5 has become stable, and all users under 1.5 RC3 and 1.0 need to upgrade. Support for 1.0 will no longer be offered, and you will be told simply to upgrade. Please continue to keep all bug and feature suggestions on the bug tracker at: Code:
http://www.techhelpforum.com/vrewrite 03/26/06 - Updated the thread to reflect vRewrite 1.5 Beta links. vRewrite files has NOT changed. 03/11/06 - Updated the thread to take advantage of vB.org's new prefix feature. vRewrite itself has NOT changed. 1.0 Release (02/19/06) - I have released the much awaited 1.0. This is the first stable release of vRewrite. All users now should be safe installing vRewrite. For more information, and how to upgrade, please see here. 1.0 Preview (01/12/06) - I have released a preview version of 1.0. This is the final version before 1.0 is considered stable. I believe everything should work in this new preview, but one bug (see known issues). Please see here for more information and how to upgrade. 01/05/06 - Updated ZIP to include a fix for boards running a table prefix. You do not need to upgrade unless you previously had SQL errors. You can upgrade by importing the product and choose "Allow Overwrite". Donations Any donations are very much appreciated! I do this out of my free time and work many hours on it - all for free. Anything to help is always very welcomed If you use vRewrite, please click Install. This helps you keep track of additional upgrades and shows to me that you care about vRewrite You may not post vRewrite ZIP or any files contained in the ZIP on any website. You may not also post any support requests/give support on any website other then this one, without my permission. If you do so, you will get a DMCA for copyright infringement. I do not want this spread to pirated users. Please stop piracy and do not share the source outside of this thread and vB.org/com. Thanks. Support will only be obtained at: https://vborg.vbsupport.ru/forumdisplay.php?f=182 Supporters / CoAuthors Show Your Support
|
Comments |
#272
|
|||
|
|||
Incorrect? Please! =) Incorrect is misleading other people with answers that don't relate to their questions while promoting a commercial product on the thread of a free alternative version.
If you really want to prove it can be done, although that wasn't the question of Smiry, and add some useful info while you're at it, you should have said: "Not really. It can be done without the ID only if you use vBSEO which is a commercial product with encrypted source and costs a lot more than your vB license. Here's my URL to prove it." This thread is about vRewrite and in that context and until further change, it is not possible to remove the id from that URL! |
#273
|
|||
|
|||
The way vRewrite currently handles all the URLs is done by ID searching. The way vBSEO is done (to my understanding as I've never used it) is done by one file which everything goes through. vRewrite 1.5 (if I ever get to it) is done by many entries in the mod_rewrite to handle all the rewrites, not done by one file. Which is why vBSEO can handle it without IDs, and vRewrite currently can't.
|
#274
|
|||
|
|||
Tutorial on custom rewrites/changing rewrtires
The first thing is first, back up all files! The next thing you want to decide if you are doing a new rewrite or modifying an existing one. Either way, we will need to modify the .htaccess mod_rewrite rules. If you are modifying an already existing one, try and find which rule it is (it is pretty self-explanatory, the (.*) and $# represent variables in the rewrite). If you are creating a new one, copy off of one and use it as a template. RewriteRule ^f-(.*)-(.*).html forumdisplay.php?f=$2 [L] What this is telling us, is anything that starts with an f and then has two variables - separated by a hyphen applies to this rewrite. Since we don't care about the name of the forum, we only want the $2 aka the ID of the forum. Let's say we want it to be forumid.html. We will need to rewrite the rule to be: RewriteRule ^forum(.*).html forumdisplay.php?f=$1 [L] It really is that simple! Before we continue, you want to make sure you have the rule correct. Just go to yourforum.com/forum(some real id here).html. Does it work? If it does, then you did it correctly (and if you used that example) otherwise don't go on until you perfected that rewrite rule. Now this is where the fun begins at. We will need to modify the plugin, but for member/showthread/forumdisplay there are an if statement to decide if we are on that. So if you are modifying any of these three, go to vB Options->vRewrite and choose the first rewrite option. We do not want the second! Now go to ACP->Plugin Manager->vRewrite under global_complete. Edit it. This is where it gets messy so I would suggest playing with it on a test vB first, and then just copy and paste the code over. It's very easy to make a small mistake and cause a white page (aka a parse error). Each rewrite rule is commented out like so: #------------------------------ # Replace Forums #------------------------------ But first we see Code:
if($vbulletin->options['vRewrite_forumrewrite'] == "2") { Here is what mine says now. PHP Code:
PHP Code:
PHP Code:
|
#275
|
|||
|
|||
Thanks for the tutorial! =) Very nice!
Made my edits without any problem, except that the pull-down menus on vboptions still reflect the previous (default) values. How can I change these? |
#276
|
|||
|
|||
You will need to turn your vB into debug mode, and then edit those settings. Or do I need step-by-step instructions? hehe
|
#277
|
|||
|
|||
A quick question, looking at the global_complete code, I see a lot of db queries that I assume are used to get some extra info not available on vb's forumcache like forum names, etc.
If we were going back to basics, using just the numeric ids, and having urls like: /f$id/, /t$id/, etc, would those queries still be needed? |
#278
|
|||
|
|||
Quote:
|
#279
|
|||
|
|||
Sure don't
|
#280
|
|||
|
|||
Don't? Cool! Might seem odd but I'll try to mod it down to bare basics.
My host is sponsoring my site, charging me nothing for all that I use so I'm always extra careful not to waste their resources on unnecessary stuff! Just to be sure I'm not making it worse, would you say that this is enough? #------------------------------ # Replace User #------------------------------ $found = preg_match_all('#member\.php\?u=([0-9]+)#i', $output, $matches); if($found) { $output = str_replace("member.php?u=$uid", "member/$uid/", $output); } |
#281
|
|||
|
|||
You'll need it put it in a while loop, I'll try and get you the code tomorrow.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|