If I click to view a new post in a thread say newpostinthread118html when the page is loaded the url has changed to showthread.php?p=401#post401 not the rewrite url.
Is this the way it should be or have I messed something up?

I just noticed you answered this in post #10

Could you let me know how to edit the php files to have the "go to first uread post" and "go to last post" with the rewrite?

please please please

I’m no longer so sure this works with 3.6.9. The following links work here on daniweb but not on my default 3.6.9

Reverse Sort Order
Member Profile
Go to last post
Go to first unread post

cscgal, thank you for the hack!

I have VB 3.7.0 RC2 and vbAdvanced 3.0.0 installed. This hack works great for the forum part, but doesn't seem to affect the main page, which is vbAdvanced territory. My guess is that vbAdvanced doesn't use print_output function from forum.

In its cmps_index.php file it calls for this function to print the main page:

print_portal_output($home);

That function is defined in includes/vba_cmps_include_top.php
It may sound silly, but I cannot figure out how to rewrite urls inside that function. Does anyone have any ideas? I would truly appreciate your help!

I learnt a valuable lesson today, DO NOT USE Dreamweaver as a text editor. I switched to Crimson and that fixed the Reverse Sort Order.
Still haven’t figured out why “Go to last post” doesn’t work and think if I did it would also fix “Go to first unread post”

You don’t have member.html or replies.html so I’ve added them below.

.htaccess

RewriteRule ^member([0-9]+).html$	member.php?u=$1 [L]
RewriteRule ^replies([0-9]+).html$	misc.php?do=whoposted&t=$1 [L]

hook

'#<a ([^>]*)href' . preg_quote("=\"misc.php?$session[sessionurl]do=whoposted&amp;t=") . '([0-9]+)"#', 
'#<a ([^>]*)href' . preg_quote("=\"member.php?$session[sessionurl]u=") . '([0-9]+)"#'

'<a \1href="replies\2.html"', 
'<a \1href="member\2.html"'

For all updated and newer versions of vBulletin 3.7 which has been tested, im not quit sure for vB 3.6x though, these codes have a minor change. I hope this can get stickied somehow for the newer versions of vB incase other members would still love this wonderful SEO from the great Dani herself!

Below:
$output = preg_replace($search_array, $replace_array, $output); will not work, it will show a blank page, so as she mentioned earlier, make sure it still stands as $vartext = preg_replace($search_array, $replace_array, $vartext);

Also, at the beginning, make sure:

function print_output($vartext, $sendheader = true)
{
    global $pagestarttime, $querytime, $vbulletin;
    global $vbphrase, $stylevar;

has now changed too:

function print_output($vartext, $sendheader = true)
{
    global $pagestarttime, $querytime, $vbulletin, $show;
    global $vbphrase, $stylevar;

This should comeplete the file edits and update. The only file this will effect is the ./includes/functions.php . Enjoy!

Although this mod does work on 3.6.9 some off my rewrites are not as they are here on DaniWeb, also it breaks the urls in the archive from archive/index.php/f-1.html to archive/index.php?f-1.html so I have two questions.

1: Are you still using this mod yourself here at DaniWeb if so do you have an update to include the missing rewrites you have here?
2: Is this mod still supported?

I am only using up to 3.6.8, and I continue to use $output.

This hack was nevery really supported. It is something I wrote for DaniWeb, implemented on DaniWeb, and then decided to share what was working for me.

As time allows, I periodically stop by and see if I can help anyone out, but that time has gotten scarce over the past year.

Over the course of the past few years, I've added additional rules to the version I personally use, but it is still majorly based off of what I've released here.

After vBulletin 3.7 goes gold, and I am forced into upgrading my own sites to a 3.7 version of this hack, I will most likely offer the 3.7 version that I'll be using in the form of a product xml file.

Member Avatar for callumbush

I am only using up to 3.6.8, and I continue to use $output.

This hack was nevery really supported. It is something I wrote for DaniWeb, implemented on DaniWeb, and then decided to share what was working for me.

As time allows, I periodically stop by and see if I can help anyone out, but that time has gotten scarce over the past year.

Over the course of the past few years, I've added additional rules to the version I personally use, but it is still majorly based off of what I've released here.

After vBulletin 3.7 goes gold, and I am forced into upgrading my own sites to a 3.7 version of this hack, I will most likely offer the 3.7 version that I'll be using in the form of a product xml file.

Cheers Dani! I began using vbulletin 2 days ago so....i'm going to wait for the xml instead of attempting to DIY my interpretation of the thread's 13 pages ;)

Looking good on VB3.6.9, 1 minute install, fantastic

If anyone is using vbexternal you will need to update the links
example:

href='{url}/showthread.php?t={threadid}'

to

href='{url}/thread{threadid}.html'

How can we do this?

I use the rss feed for another site and the urls are not rewritten.

Is this what you are talking about.

Does anyone know how to make the urls rewritten when accessing the rss feeds?

Thanks*

Anyone help.

I've applied this mod with the attached XML file,

I added the rewritebase and got the forums working, but can't get into any of the threads, pulls a 404 for me..

I have my forum set to ....com/forum

Member Avatar for callumbush

Anyone help.

I've applied this mod with the attached XML file,

I added the rewritebase and got the forums working, but can't get into any of the threads, pulls a 404 for me..

I have my forum set to ....com/forum

Where can I find the XML file?

Easiest way,

go back to the forum, and you'll see a paperclip to the right of the thread title. Click the paper clip..

I am only using up to 3.6.8, and I continue to use $output.

This hack was nevery really supported. It is something I wrote for DaniWeb, implemented on DaniWeb, and then decided to share what was working for me.

As time allows, I periodically stop by and see if I can help anyone out, but that time has gotten scarce over the past year.

Over the course of the past few years, I've added additional rules to the version I personally use, but it is still majorly based off of what I've released here.

After vBulletin 3.7 goes gold, and I am forced into upgrading my own sites to a 3.7 version of this hack, I will most likely offer the 3.7 version that I'll be using in the form of a product xml file.

CSGal,

Thanks for the hack, I have Vb 3.7. I would like to know if SEO hack is available for version 3.7, or if I can use the hack built for previous versions...

Thanks

vB 3.8.0 has just gone gold, with 4.0.0 is in development.
I guess it would be some time yet before we get to see the update of this nice little hack.

Thanks for sharing the original code with us anyway. ;)

Hi, I am new Can you give me an idea what this is and does for SEO...Thanks

I've just applied the patch and I think there is a bug. When reading a thread, i.e. "thread203.html", when I change the style (from drop-down box on top-left), the link becomes "thread203.html?styleid=5", which shows exactly the same page with no style updated. I'm using vB 3.5.2. Is there any way to fix this?

You can see this at this link. Try changing the style on bottom-left.

P.S. Thanks a lot for the patch, very nice! ;)

Dani - I've had to disable this mod due to this issue. I'd installed it today, using the xml file provided. Still had to manually edit my .htaccess file but that was no big deal.

This bug makes this Mod a non starter for me, is there something better than this Mod to do the same thing but using the thread titles in URLs and not have this style bug?

I no longer maintain this product/plugin. Unfortunately, it doesn't work with multiple styles. For thread titles in the URL, try vBSEO.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.