![]() |
You need to edit your postings.php - there is a post in this thread on how to do this already.
|
Quote:
|
This hack doesn't affect forumjump, so I don't know why your forumjump is like that to be honest.
|
Quote:
in the header? If that still doesn't work, you may have to edit the window.location() javascript functions in the templates and prefix them with a forward slash or the forum url. |
Anyone knows what I need to code the "page navigation" numbers to be Search Engine Friendly?
I know it can be done, because I saw these guys have done it at: http://www.techimo.com/forum/f3/index.html . This links look like this: http://www.techimo.com/forum/fid3/dp1000/so/sflastpost/pp50/pn2/index.html . |
I ran into a new problem. I recently changed servers and it seems as though mod_rewrite isn't working at all. Every page comes up with a 404.
Take a look: http://board.midibuddy.net No links work!! AHH!! mod_rewrite is enabled on the server. Everything should work fine, right? This is what my .htaccess file looks like: PHP Code:
HELP!!! :eek: |
i know this is a old post, but when i use the fix for whos online it says viewing thread without the link to the thread and the same as viewing forum
|
Hi guys
Geat hack.....its the sole reason why i converted from yabbse to vbulletin yesterday :) I've installed it but i think its still using sessions http://www.cyclingforums.com/f48/s isnt this a problem for google? It would be good to be able to get rid of sessions unless they were required great hack btw :) cheers! |
Quote:
Code:
RewriteEngine on |
This hack is even better than you think cyc, my small board gets about 1000 uniques a day because of this genious hack (got to have some page rank though, which you have) :D
But I really want to second fello9`s question about the secret to enable this hack for page navigation. Do you have an idea fastforward, or anyone? Thanks, Haakon |
Quote:
I will try and update the file sometime soon to reflect all the bug fixes and additions that people have contributed. |
That was me asking that same question back then :); but it didn`t do anything to my board, so I ask again ;)
|
Quote:
I'll make a commitment and promise to find a solution this week. I promise to have something by next Wednesday. I could make use of that feature myself actually. |
Thanks!, that`s great fastforward.
But I see now that amykhar got it working, maybe you could test it, maybe it`s just my site. I use htaccess, it would be great if you find a solution! Thanks, Haakon |
how do you force everyone to use cookies?
I've added the new rewrite rule and deleted the sessionhash from the templates, but in the users online section I can still see some users browsing with sessions :ninja: cheers! |
You can't force them to use cookies, they can block them on there machine if they want to.
|
Quote:
Most users are showing with the short url. cheers! |
Cyc, the googlebot gets a little confused the first month, so you might experience that it crawls both rewritten urls and normal ones. At least it did this with my site the first months, but it won`t hurt you.
|
Quote:
|
Has anyone set this up so guests get the rewritten urls and members get the normal urls? is this even possible?
cheers! |
Quote:
You'll need to install this hack to assign styles to usergroups: https://vborg.vbsupport.ru/showthrea...ghlight=styles |
Can somebody help me? I don't understand what I'm suppose to do in step one. Can somebody give me some more in-depth intructions on step one? What exactly am I suppose to do? Please help, I would really like to install this hack. :(
|
Edit: 13 Dec 2003, posted some notes about VB version 3 Beta 7.
https://vborg.vbsupport.ru/showpost....&postcount=298 Edit: 26 July 2003, buro9 has found and fixed quite a few bugs, he has also made improvement. Please refer to his post at: https://vborg.vbsupport.ru/showthrea...257#post418257 Edit: 9 Feb 2003, added RewriteCond to fix search result navigation problem. Edit: 5 Feb 2003, added RewriteCond to fix member list navigation problem. Edit: 2 Feb 2003, added hack to the forums/threads page navigation links to cover more threads. Change made to pagenumber and perpage's position from my initial post. =========== I will share my experience with this hack. My web server is running apache. First of all, your web server needs to have mod_rewrite module installed and enabled. I put rewrite rules in .htaccess (in httpd.conf should be the same) I decided not to use session ID. I will explain this later. First, for .htaccess to work, you need to enable it with "AllowOverride" in your httpd.conf file. My AllowOverride line looks like this: AllowOverride AuthConfig Options FileInfo Naturally AllowOverride All will work too. For Redhat and Mandrake Linux, httpd.conf file is located under: /etc/httpd/conf/ If you don't know where is yours, try: #locate httpd.conf For those of you who can not access to httpd.conf file, eg. use someone else's server etc, .htaccess is a better option. I use .htaccess for different settings including php options for different software. You may only want rewrite rules for a certain software, not everything under the same domain! My rewrite rules extracted from .htaccess: RewriteEngine on RewriteRule ^f([0-9]+)\.html$ forumdisplay.php?forumid=$1 [L] RewriteRule ^f([0-9]+)-([0-9]+)\.html$ forumdisplay.php?forumid=$1&daysprune=30&sortorder =&sortfield=lastpost&perpage=25&pagenumber=$2 [L] RewriteRule ^t([0-9]+)\.html$ showthread.php?threadid=$1 [L] RewriteRule ^t([0-9]+)-([0-9]+)-([0-9]+)\.html$ showthread.php?threadid=$1&perpage=$2&pagenumber=$ 3 [L] RewriteRule ^t([0-9]+)-([0-9]+)--(.*)--([0-9]+)\.html$ showthread.php?threadid=$1&perpage=$2&highlight=$3 &pagenumber=$4 [L] RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ RewriteRule ^memberlist.php$ memberlist.php?%1&pagenumber=%2? [L] RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ RewriteRule ^search.php$ search.php?%1&pagenumber=%2? [L] Why don't I use session ID? The Googlebots hate the most is session ID. As soon as they remotely detect there is an session id, they turn around and go away. This is why no vBulletin boards will be indexed. I have got a feeling that if the session id is removed, even with no rewrite hack and with the "?" in the URL, google will index the forums. The reason why Googlebots do not like session ID is: Each time the bot visits, for the same contents, it will be fed with different URL. Sometimes more than one bots might visit at the same time. They might be pulling the same page with different URL! I also believe Google punishes with lowered PR rating for those web sites that have different URLs for the same page. So even if you do rewrite session IDs as part of URL, the bots will get different URLs for the same page, when they process the data and find out, they will give your site a lowered PR rating, with passion! as your site has wasted a lot of their time.:) The second reason for not using session ID is security. Imagine this, you have your cookies turned off, you go to this forums, log in and find something good, you subsequently copy the URL of one of the thread and paste in a post. As the session ID carries your Logged in ID. Now if someone else who has not even logged in click on the URL you just posted, he becomes you, he can then post under your name! Tell this to your members, then you will have no problem forcing them to turn on the cookies.:) You will notice for the forums, I also use .html as the forums page instead of the original directory structure for the forums. Google lowers PR rating for each directory layer, so don't let the "/" get in the way. Also with "/", you will have image display problems etc. As the displayforums.php is in the root directly, now your page is "/f10298740/" . The following templates need to be changed: 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 usercp_forumbit Find forumdisplay.php?s=$session[sessionhash]&forumid=$forum[forumid] Replace it with: f$forum[forumid].html For forumdisplaybit template, Replace <a href="showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]">$thread[title]</a> with <a href="t$thread[threadid].html">$thread[title]</a> For forumdisplay_multipagenav_pagenumber Replace <a href="showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]&perpage=$pperpage&pagenumber=$acurpage">$acurpage </a> with <a href="t$thread[threadid]-$pperpage-$acurpage.html">$acurpage</a> To fix "Who is online" problem. In online.php, find: $loc=preg_replace("/\?s=[a-z0-9]{32}(&)?/","?",$loc); add the following lines: $loc=preg_replace("/f(\d+).html/","forumdisplay.php?forumid=\$1",$loc); $loc=preg_replace("/t(\d+).html/","showthread.php?threadid=\$1",$loc); $loc=preg_replace("/t(\d+)-(\d+)-(\d+).html/","showthread.php?threadid=\$1",$loc); I will post more information when I find more problems with the hack. Hope my experience helps someone. :cool: ========= Edit: added the hack for forumdisplay.php navigation links Fix Forums Navigation links: open forumdisplay.php Find $pagenav = getpagenav($totalthreads,"forumdisplay.php?s=$sess ion[sessionhash]&forumid=$forumid&daysprune=$daysprune&sortorder=$ sortorder&sortfield=$sortfield&perpage=$perpage"); replace it with: $pagenav = getpagenav($totalthreads,"f$forumid"); Change the following templates as well. pagenav_firstlink find: <a href="$address&pagenumber=$curpage" title="first page"> change to: <a href="$address-$curpage.html" title="first page"> pagenav_lastlink find: <a href="$address&pagenumber=$curpage" title="last page"> change to: <a href="$address-$curpage.html" title="last page"> pagenav_nextlink find: <a href="$address&pagenumber=$nextpage" title="next page"> change to: <a href="$address-$nextpage.html" title="next page"> pagenav_pagelink find: <a href="$address&pagenumber=$curpage">$curpage</a> change to: <a href="$address-$curpage.html">$curpage</a> pagenav_prevlink find: <a href="$address&pagenumber=$prevpage" title="previous page">«</a> change to: <a href="$address-$prevpage.html" title="previous page">«</a> ============= Open showthread.php find: $pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage".iif(isset($h ighlight), "&highlight=$highlight", "")); change it to: $pagenav = getpagenav($totalposts,"t$threadid-$perpage".iif(isset($highlight),"--$highlight-", "")); |
Thanks, especially for the multi page addon I really needed that.
Cheers, Haakon |
Hi,
Thats a very handy post! I cant get the forumdisplay_multipagenav_pagenumber bit to work, i get a 404 error when going to the new short url's. Everything else has been working great for the last week or so :banana: cheers! |
Quote:
|
Quote:
RewriteEngine on RewriteRule ^/f([0-9]+)/?$ /forumdisplay.php?forumid=$1 [L] RewriteRule ^/f([0-9]+)/s?$ /forumdisplay.php?forumid=$1 [L] RewriteRule ^/t([0-9]+)\.html$ /showthread.php?threadid=$1 [L] RewriteRule ^/t([0-9]+)/s([^/]?)\.html$ /showthread.php?threadid=$1&s=$2 [L] RewriteRule ^/s([^/\?]0-9)+/$ /index.php?s=$1 [L] RewriteRule ^t([0-9]+)-([0-9]+)-([0-9]+)\.html$ showthread.php?threadid=$1&perpage=$3&pagenumber=$ 2 [L] goto http://www.cyclingforums.com/f47 and click on a number in the top thread. cheers! |
Quote:
http://www.cyclingforums.com/f47/ not http://www.cyclingforums.com/f47 So either you need to add a '/' to your template or just make your rewrite rule to: RewriteRule ^/f([0-9]+)$ /forumdisplay.php?forumid=$1 Your rewrite rule is looking for: URL matches (between "^" and "$") which is /f123/xxx Try ^/f([0-9]+)$ or ^f([0-9]+)$ |
The original hack does not change the forums/threads' navigation links. ie.
Pages (5): « First ... « 3 4 [5] Pages (26): « First ... « 23 24 [25] 26 » So basically the bots can only craw the first page of a single forum. With my addtional hack, the bots will be able to crawl all the threads specified by "Last 30 days" or whatever the default setting is. This also allows every thread to be crawled even if they are spreaded through more than 4 (or 9) pages. I have edited my original post to include this hack. |
Thanks again lierduh, can`t imagine the increase in visitors for next month :)
However, there is a little problem with the last hack (I think it`s the last one). If you look in member list, the page button is now disabled. Someone spotted it in my forum, and I see you`ve also got the problem. Can you fix it :D I`ve also got a problem now with some of the thread`s last page will be blank. Not sure if this is because of your hack, but maybe you know something about it? Thanks, Haakon |
Quote:
I'm have an issue with the navigation for the thread lists..... http://www.cyclingforums.com/f47 (the links/numbers) would I be right in thinking its a prob with my rewrite rules? #### edit #### I've uninstalled the changes that relate to this post, people started complaining about dead links :confused: thanks |
Edit: Also added RewriteCond for search.php to make sure multi-page search result work properly.
Quote:
RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ RewriteRule ^memberlist.php$ memberlist.php?%1&pagenumber=%2? [L] RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ RewriteRule ^search.php$ search.php?%1&pagenumber=%2? [L] Edited my original post to reflect this.:) Please note, I have changed the positions for the 'perpage' and the 'pagenumber' from my initial post. ie. It used to be "f123-2-15.html" it is now: "f123-15-2.html" where 2 is the page number, 15 is 'how many' per page. I changed both the rewriterules as well as the templates to allow me adding the navigation link hack. Please refer to my original post. |
Quote:
For all this trouble, Google rewards by sending a bunch of bots everyday hammering the site.:) BTW, I selected this hack instead of the archive hack because when visitors click on the Google results, they are taken straight to the forums instead of the archive pages. |
lierduh, I've had your system running on my site for the past few months now... works great - Google has added thousands of my pages into its archive. :)
|
Quote:
The same page nav works fine when on the page with the thread headings, just not the threads themselves. BTW i've uninstalled it again cause me users hate dead links :laugh: I'm not using .htaccess because i run the server its on and therefore can edit the conf file. cheers! |
Quote:
There is no difference for the Rewriterules between httpd.conf and .htaccess There are only two areas that could go wrong, that is the templates which generate the URL and the Rewriterule that catches/matches your URL. Again, if you could post the Dead URL and your rewriterules, I might be able to pin point what you did wrong. |
Quote:
##### edit ###### I've got it working, my rewrite rules were alittle messed up. Thanks for your help, I really appreciate it mate! *waits for google* cheers! |
Quote:
|
Quote:
Glad it is working for you. Don't forget the last hack (RewriteCond) regarding the memberlist. Otherwise your member list navigation will not work. Fortunately this is a simple one, only need to add two lines to your rewriterules. Waiting for more things to break, I am sure there is. :) eg. Merge Thread does not work anymore due to the new URL. Do I care to fix this is another question.:) |
When I say "your" system, lierduh, I mean the multiple page version of this hack. :) I don't use the same hack as you, I've customised my own version.
|
All times are GMT. The time now is 12:01 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:
|