Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Mod_rewrite tutorial for vB3
cscgal
Join Date: Aug 2003
Posts: 63

by cscgal cscgal is offline 15 Aug 2004

I've written a detailed tutorial for vBulletin 3 how to go about using mod_rewrite to allow your forum to have clean URLs. It goes so far as to give forum URLs names such as forum-name.html instead of forum-IDnumber.html

It's available here: http://www.daniweb.com/techtalkforums/thread9379.html

I hope that you enjoy it!
Views: 4027
Reply With Quote
Comments
  #2  
Old 15 Aug 2004, 11:14
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Real name: Dean Clatworthy
Hi dani,

Please could you post the tutorial here, so in the event your site goes down our users aren't left stranded. Thankyou
__________________
Dean Clatworthy - Web Developer/Designer
Reply With Quote
  #3  
Old 15 Aug 2004, 12:04
cscgal's Avatar
cscgal cscgal is offline
 
Join Date: Aug 2003
At this time, I would rather not spread my tutorial around to other sites. As I just wrote it late last night, I am still getting a lot of feedback about it, and therefore I keep making updates and revisions to the tutorial. (There have actually been 3 changes in the past 2 hours!) For that reason, I would rather keep it all in one place. In addition, I might as well just come out and say that the only reason I decided to share my technique (via the tutorial) was to hopefully draw some attention to my web development and SEO forums.
Reply With Quote
  #4  
Old 22 Aug 2004, 11:23
hpwilhelm hpwilhelm is offline
 
Join Date: Mar 2002
Real name: HP
Thanks cscgal! Just what I was looking for!

Registered at your site also, looks like a good place to be...
Reply With Quote
  #5  
Old 22 Aug 2004, 11:33
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Real name: Dean Clatworthy
There's really no need to rewrite the URL's in your vBulletin. The spiders have no problems interpreting the default query string. Also they have no problems spidering the archive
__________________
Dean Clatworthy - Web Developer/Designer
Reply With Quote
  #6  
Old 22 Aug 2004, 15:10
cscgal's Avatar
cscgal cscgal is offline
 
Join Date: Aug 2003
Thanks hpwilhem. Dean C, I've actually seen this argument sooo many times But, hey, I think it really helps a lot, and so does my SEO guy so that's all that matters
Reply With Quote
  #7  
Old 30 Apr 2005, 06:53
cscgal's Avatar
cscgal cscgal is offline
 
Join Date: Aug 2003
Hey there fellas. I just want to give you an update on the DaniWeb mod_rewrite hack - I've updated it to what DaniWeb is currently using, in a whole new tutorial. There is support for multiple pages, Who's Online (no more Unknown locations!), previous / next threads, linear / hybrid / threaded modes, and much more! Enjoy

http://www.daniweb.com/tutorials/tutorial22840.html
Reply With Quote
  #8  
Old 11 May 2005, 13:15
sv1cec sv1cec is offline
 
Join Date: May 2004
Real name: John
Can someone shed some light for me, as far as what this hack actually does? I checked Daniweb and I can find no such description.

Thanks
__________________

John
SV1CEC
Reply With Quote
  #9  
Old 11 May 2005, 14:28
cscgal's Avatar
cscgal cscgal is offline
 
Join Date: Aug 2003
It rewrites the forum URLs so that they are cleaner. For example:

http://www.daniweb.com/techtalkforum...read.php?t=123

is now written as

http://www.daniweb.com/techtalkforums/thread123.html

The advantage of this is much better spiderability by search engines, since it fools the search engines into thinking you have static HTML pages instead of dynamic PHP pages with query strings.
Reply With Quote
  #10  
Old 11 May 2005, 16:18
sv1cec sv1cec is offline
 
Join Date: May 2004
Real name: John
Thank you for your quick response.

Rgds
__________________

John
SV1CEC
Reply With Quote
  #11  
Old 11 May 2005, 19:34
ice9 ice9 is offline
 
Join Date: Jun 2003
Dean C -- my experience is not similar to yours, but if you're successful in getting your content indexed without having to hack the urls, that's a huge bonus -- this hack is a major PITA!

cscgal -- I appreciate the work you've put into this. I SEO'd vb2 years ago, and it made a HUGE difference in traffic to my site. I've recently upgraded to vb3, and I'm putting some serious effort into properly rewriting the urls again.

I remember a while back Overgrow.com was one of the first sites I knew of to put work into SEO for vb. Overgrow opted for the archive system, which, IMO, is inferior to cleanly re-written urls. Overgrow pointed me to dbforums.com, they were one of the first sites to successfully use static urls with vb.

I'm working on inserting the thread title into the url. Also, I think duplicate pages are a bad move. A crawler should only receive one version of a page. Scripts like printthread.php and showpost.php present the same content to a bot as showthread.php. This sets you up for a duplicate content penalty. Same thing with cramming variables into hyphenated urls, like this: site.com/forum/t12345-15---2-asc--3.html and site.com/forum/t12345-10-2-10-desc--.html are sloppy, and are often duplicates. Maybe dupes like that should be excluded via robots.txt? I like threads that appear to be in the main directory -- better SEO. I think the ideal url would look like this:

site.com/t(threadid)-(hyphenated thread title)(-pagenumber).html

For example:

site.com/t12345-SEO-vbulletin-2.html

I'm not sure what to do with the perpage variable. I don't really think it's that necessary, and it makes for duplicate urls.

Besides, I think that other showthread/forumdisplay variables can be added on AFTER the .html suffix, like this:

site.com/t12345-SEO-vbulletin-3.html&order=asc&highlight=word&perpage=25

Then, robots.txt could be used to exclude a crawler from any url that has variables after the .html suffix. So, no dupes.

Either way, if a variable is empty, its hyphen shouldn't be in the url. This looks bad:

site.com/t12345----10---asc-.html

Also, watch for the "." character in your .htaccess file. It's a regex wildcard, and will need to be backslash-escaped if it is to represent a period, as in \.html.

Most SEO vb hacks don't allow for styleid adjustments via the dropdown menu.

Some sites use a default style for re-written urls for non-registered members, and then feed another style to registered members. So the bots get the rewritten urls, and members get the real ones. I disagree with this -- better rankings are accorded to urls that are used, and linked to on other sites. When members are on other sites, and they link to your threads, it should be with properly rewritten urls.

mod_rewrite has a logging function that can be very useful, although it's rather verbose, even at the lower settings.


Hope this helps -- sorry for the long post. This is an extremely complex hack that most sites are not using to its full potential.
Reply With Quote
  #12  
Old 05 Jun 2005, 01:25
vktechnology vktechnology is offline
 
Join Date: Jul 2004
Real name: V Kanphugdee
very cool,
URL friendly, human readable,
it is good for user to remeber URL
It look like static page
Reply With Quote
  #13  
Old 20 Jun 2005, 11:48
cristi71000 cristi71000 is offline
 
Join Date: Jun 2005
Hi,

Is this optimisation working for vBulletin forums hosted on IIS? And if not are there any alternatives?

Thanks,
Cristian
phoneheaven.org
Reply With Quote
  #14  
Old 20 Jun 2005, 18:44
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Real name: Lucius Hunk
I think this is unnecessary since vb offers HTML package too for your site.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 09:44.

Layout Options | Width: Wide Color: