User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,568 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,604 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 71637 | Replies: 238
Reply
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 11,020
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 33
Solved Threads: 117
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

  #31  
Aug 23rd, 2004
You're very welcome ToOnZ! I hope you got it all straightened out. Darmak, what you're asking seems that it can be accomplished by editing the includes/functions_online.php file. There is actually an existing vB.org hack that might be helpful - please let us know if it worked for you:

http://www.vbulletin.org/forum/showthread.php?t=66569
Reply With Quote  
Join Date: Aug 2004
Posts: 2
Reputation: Darmak is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Darmak Darmak is offline Offline
Newbie Poster

Re: vBulletin mod_rewrite

  #32  
Aug 25th, 2004
You're very welcome ToOnZ! I hope you got it all straightened out. Darmak, what you're asking seems that it can be accomplished by editing the includes/functions_online.php file. There is actually an existing vB.org hack that might be helpful - please let us know if it worked for you:

http://www.vbulletin.org/forum/showthread.php?t=66569

Thanks but this hack is for .php scripts and not works whit this mod :/

Any other idea?
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 11,020
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 33
Solved Threads: 117
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

  #33  
Aug 25th, 2004
Are you sure? I was under the impression it will work for all files - php and html. In any case, the file that you would need to edit is the includes/functions_online.php file. When I have more time, I'll investigate it further.
Reply With Quote  
Join Date: Mar 2004
Posts: 47
Reputation: I, Brian is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
I, Brian's Avatar
I, Brian I, Brian is offline Offline
Light Poster

Re: vBulletin mod_rewrite

  #34  
Aug 27th, 2004
I've just tried to have a proper go of this on my religion forums - I did try very hard to follow the instructions as entirely and *only* described in the original post - - - but I have a problem I'm afraid I don't understand, and input would be much much appreciated.

The problem is that every single link leads to a 404. I have an index page with no working links.

However, a couple of things don't look as planned and this may help diagnose the problem:

I tried to follow CSGAL's method of using .htaccess to rename all boards on a forum.

Yet whether I include the rewrites for my individual board names - or not - in the .htaccess file, all of my board names are rewritten anyway.

So whether I include:

   RewriteEngine on
   Options +FollowSymLinks
   RewriteRule ^thread([0-9]+).html$ showthread.php?t=$1 [L]
   RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
   RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
   RewriteRule ^forum([0-9]+).html$ forumdisplay.php?f=$1 [L] 
   
   RewriteRule ^belief-spirituality.html$ forumdisplay.php?f=12 [L]
   

or not, my boards still have their names rewritten - for example, the above forum is rewritten as:

/community/belief-and-spirituality.html




Another odd thing is that my sub-forums are all showing with the link:

/community/.html

And that's with - or without - the .htaccess file editing.



None of the "newpostinthread2333.html" etc links work either - absolutely every forum link goes to a 404.



Any ideas whatsoever would be greatly appreciated. I'll keep the forum closed down for the time being until I can get this figured out - at least for today.

Help. Please?



:eek:

Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 11,020
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 33
Solved Threads: 117
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

  #35  
Aug 27th, 2004
Board names are rewritten due to Step 1, editing the includes/functions_forumlist.php file - nothing to do with the editing of the .htaccess file.
Your sub-forums showing a bad link looks like you made a typo in the forumhome_subforumbit_nopost or forumhome_subforumbit_post templates. Just revert those two templates and try again - it looks like you have an added '/' symbol somewhere.
As far as why newpostinthread links don't work - that doesn't make sense. By looking at your .htaccess file they should. But let's take care of one problem at a time. And when everything else is fixed, then we'll look at this problem.
Reply With Quote  
Join Date: Mar 2004
Posts: 47
Reputation: I, Brian is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
I, Brian's Avatar
I, Brian I, Brian is offline Offline
Light Poster

Re: vBulletin mod_rewrite

  #36  
Aug 27th, 2004
Thanks for the suggestions - much appreciated.

I just repeated everything again, reverting all templates, then re-editing them carefully, trying not to make typos - but nothing has changed.

Is it possible that there's something about Apache that is unusually configured on the server my forums are running from? I know on another vBulletin I have the static archive feature does not work because PHP is running as CGI. Is it possible that something similar is happening here?
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 11,020
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 33
Solved Threads: 117
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

  #37  
Aug 27th, 2004
Here's what to do. Create an .htaccess file and put everything from Step 5 only into it. Upload it to your forum's root directory. Then, manually type into your browser: www.yourdomain.com/forum/forum1.html or whatever your directory structure just happens to me. Then let me know what happened.
Reply With Quote  
Join Date: Mar 2004
Posts: 47
Reputation: I, Brian is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
I, Brian's Avatar
I, Brian I, Brian is offline Offline
Light Poster

Re: vBulletin mod_rewrite

  #38  
Aug 27th, 2004
Ah-ha-ha! Success!

The key was the .htaccess file in the forum root folder! (As opposed to site root folder, if forum not at the root.)

The only possible additional issue is that the forum titles absolutely had to be the forum URLs - so a board named "keyword1 and keyword2" could not be in the .htaccess file as "keyword1-keyword2" - had to be "keyword1-and-keyword2". I wasn't expecting that. But was easily corrected for via .htaccess.

Dani, you are so a star.

Ten thousand blessings on you.
Last edited by I, Brian : Aug 27th, 2004 at 12:21 pm. Reason: more blessings :)
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 11,020
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 33
Solved Threads: 117
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: vBulletin mod_rewrite

  #39  
Aug 27th, 2004
I'm really glad you got it working Brian Very cool! I just went back and double-checked my original tutorial thinking maybe I left out about how the .htaccess has to go in your forum directory, but nope, it said that all along

Also, the file includes/functions_forumlist.php creates forum URLs by taking the forum title, converting all letters to lowercase, replacing all slash characters with the dash character, and replacing all spaces with the dash character. So a forum called "Me and You" will be translated to "me-and-you" given those rules.

With a bit of tweaking to Step One of the tutorial, you can remove the word "and" from your rewritten URLs ... or basically remove / tweak / edit any combination of letters to be translated into how you want. I could even tweak it so that a forum called "Dani and vBulletin" could be translated to the URL "dani-and-vB" by replacing all instances of vBulletin with vB ... or translated to "dani-vBulletin" by replacing all instances of " and" with the empty/null string. As you can see, this is the same logic that is used to replace a space " " character with a "-" dash character.
Reply With Quote  
Join Date: Mar 2004
Posts: 47
Reputation: I, Brian is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
I, Brian's Avatar
I, Brian I, Brian is offline Offline
Light Poster

Re: vBulletin mod_rewrite

  #40  
Aug 27th, 2004
Thanks for the tips - it's always just the daft little things that floor me. Apologies if I made you look too hard.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 5:56 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC