943,373 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 110888
  • PHP RSS
You are currently viewing page 4 of this multi-page discussion thread; Jump to the first page
Aug 23rd, 2004
0

Re: vBulletin mod_rewrite

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
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Aug 25th, 2004
0

Re: vBulletin mod_rewrite

Quote ...
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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Darmak is offline Offline
2 posts
since Aug 2004
Aug 25th, 2004
0

Re: vBulletin mod_rewrite

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.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Aug 27th, 2004
0

Re: vBulletin mod_rewrite

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:

Reputation Points: 10
Solved Threads: 1
Light Poster
I, Brian is offline Offline
47 posts
since Mar 2004
Aug 27th, 2004
0

Re: vBulletin mod_rewrite

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.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Aug 27th, 2004
0

Re: vBulletin mod_rewrite

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?
Reputation Points: 10
Solved Threads: 1
Light Poster
I, Brian is offline Offline
47 posts
since Mar 2004
Aug 27th, 2004
0

Re: vBulletin mod_rewrite

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.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Aug 27th, 2004
0

Re: vBulletin mod_rewrite

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 :)
Reputation Points: 10
Solved Threads: 1
Light Poster
I, Brian is offline Offline
47 posts
since Mar 2004
Aug 27th, 2004
0

Re: vBulletin mod_rewrite

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.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Aug 27th, 2004
0

Re: vBulletin mod_rewrite

Thanks for the tips - it's always just the daft little things that floor me. Apologies if I made you look too hard.
Reputation Points: 10
Solved Threads: 1
Light Poster
I, Brian is offline Offline
47 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: DNS subdomain wildcard
Next Thread in PHP Forum Timeline: Perplexed Newbie can't find syntax errors





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC