•
•
•
•
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,564 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,522 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: 71633 | Replies: 238
![]() |
•
•
•
•
Originally Posted by setuid
The use of [L] and [R] are completely different things. I suggest reading the mod_rewrite documentation to understand what each of the flags means. Search the docs for the string '[flags]' without the quotes, and you'll the details of each specific flag, with plenty of examples to use to help you understand them further.
That being said, [R] is the ONLY way to properly redirect the user (which is why the flag exists). I'd stick to the standards more than I'd violate them to boost SEO revenue (and yes, I know a LOT about all of this).
BigBlueBall - Everything about instant messaging
MessengerMods - Customize MSN with display pictures and emoticons
HisBuddyIcons - AIM buddy icons for dudes
BigBlueTemplates - 1,000s of professional website templates
MessengerMods - Customize MSN with display pictures and emoticons
HisBuddyIcons - AIM buddy icons for dudes
BigBlueTemplates - 1,000s of professional website templates
•
•
Join Date: Mar 2005
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
(I hope the forum isn´t counting me out again - tried to post this a few minutes ago and the forum just logged me out and the post was gone :mad:..to hell..
)
Hi there,
this mod_rewrite modification is truely awesome and I wanna thank those who shared their knowledge to the community.
First I gotta say - sorry for my english, I´m from germany and my english is a little bit frozen. Don´t have to use it here very often
I´m running several vb3.03´s on a shared server, seperated through subdomains (All running in different subfolders and different db´s). So far as I can see I have a problem with the .htaccess-file because after uploading the modified one I´m encountering ugly error 500´s.
The server itself tells me in phpinfo that the mod_rewrite module is loaded - which means to me that the apache supports this function.
I tried to search this thread for others with the same problem - but it seems that I´m the only one. (Dani, have you already noticed that the "Search this thread"-function isn´t working correct ? It comes up with results for the entire site instead of showing results for the specific thread where you started the search.)
Therefore I´m running the boards in subfolders I uploaded one .htaccess-file in each and every board-root (modified for the specific board). Another .htaccess exists in the server-root which is pointing to the errordocuments 403, 404 and 500.
Could it be that I have to deal with rewrite_base url´s when using subforums ? At the moment my .htacces looks like this:
[PHP]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 ^info-support.html$ forumdisplay.php?f=2 [L]
(...)[/PHP]
Could anyone help me to get this thing up and running ? I just don´t see & understand what I could have done wrong..:o
Any help appreciated.
Regards,
Marv.
)Hi there,
this mod_rewrite modification is truely awesome and I wanna thank those who shared their knowledge to the community.
First I gotta say - sorry for my english, I´m from germany and my english is a little bit frozen. Don´t have to use it here very often

I´m running several vb3.03´s on a shared server, seperated through subdomains (All running in different subfolders and different db´s). So far as I can see I have a problem with the .htaccess-file because after uploading the modified one I´m encountering ugly error 500´s.
The server itself tells me in phpinfo that the mod_rewrite module is loaded - which means to me that the apache supports this function.
I tried to search this thread for others with the same problem - but it seems that I´m the only one. (Dani, have you already noticed that the "Search this thread"-function isn´t working correct ? It comes up with results for the entire site instead of showing results for the specific thread where you started the search.)
Therefore I´m running the boards in subfolders I uploaded one .htaccess-file in each and every board-root (modified for the specific board). Another .htaccess exists in the server-root which is pointing to the errordocuments 403, 404 and 500.
Could it be that I have to deal with rewrite_base url´s when using subforums ? At the moment my .htacces looks like this:
[PHP]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 ^info-support.html$ forumdisplay.php?f=2 [L]
(...)[/PHP]
Could anyone help me to get this thing up and running ? I just don´t see & understand what I could have done wrong..:o
Any help appreciated.
Regards,
Marv.
•
•
Join Date: Mar 2005
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Originally Posted by DanceInstructor
Are you using mod_alias? If so you should use the [PT] flag with mod rewrite rules.
Hi DanceInstructor,
so far as I can see mod_alias is listed as a loaded module on the server - the same way mod_rewrite is. Does this mean that I have to use the [PT] flags ? (Even if I don´t have a glue what they are used for..)
If so - could you do me a favor and show me an example how I should fix the .htaccess-file?
Regards & TIA,
Marv.
•
•
Join Date: Mar 2005
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
So far, so good. Seems that my problem discribed in the post above is solved. The reason for the error 500´s was a disabled AllowOverride (NONE) in the httpd.cfg, so we changed that to ALL. That did the trick.
By now I´m struggeling with another problem some mentioned before. The odd "domain.com/.html"-problem with subforums.
It took me some time today to read through all 13 pages of this thread, but as far as I understood - with my limited english-skills - few had the problem but nobody a solution to it. Am I wrong ?
It´s the same problem as described here http://www.daniweb.com/techtalkforums/showpost.php?p=48534&postcount=34 but unfortunality his solution and Dani´s suggestion didn´t seem to work for me.
May be I´m just snowblind :rolleyes:. Could someone have a look in my functions_forumlist.php if I made a mistake in there?
By now I´m struggeling with another problem some mentioned before. The odd "domain.com/.html"-problem with subforums.
It took me some time today to read through all 13 pages of this thread, but as far as I understood - with my limited english-skills - few had the problem but nobody a solution to it. Am I wrong ?
It´s the same problem as described here http://www.daniweb.com/techtalkforums/showpost.php?p=48534&postcount=34 but unfortunality his solution and Dani´s suggestion didn´t seem to work for me.
May be I´m just snowblind :rolleyes:. Could someone have a look in my functions_forumlist.php if I made a mistake in there?
•
•
Join Date: Mar 2005
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
Now, that I´ve almost spent the whole weekend in front of my computer, had uncountable talks with other vb3-fellows it seems that I can´t solve this and I´m about to give up. Even when everything else is fine - except the forumhome with all the dead /.html links.
At this point I get mad at myself that I can´t see whats going wrong here.. :mad: Or in other words: I´m really desperate and looking for help :-|
So please.. anyone ?
At this point I get mad at myself that I can´t see whats going wrong here.. :mad: Or in other words: I´m really desperate and looking for help :-|
So please.. anyone ?
•
•
Join Date: Mar 2005
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
Hi All
Thanks Dani for an excellent mod, I just have a few questions I hope someone can answer before I go ahead and isntall the mod.
Not sure if this is the case already, but I wondered if it is possible to make the mod only affect 'guests' (ie non logged in users such as search engine bots). The reason I ask is because I guess limiting it just to guests would be easier on server load(?) and won't mess around with any session ids that vB may be utilising?.
I'd appreciate your thoughts.
And thanks for writing a great article.
Thanks Dani for an excellent mod, I just have a few questions I hope someone can answer before I go ahead and isntall the mod.
Not sure if this is the case already, but I wondered if it is possible to make the mod only affect 'guests' (ie non logged in users such as search engine bots). The reason I ask is because I guess limiting it just to guests would be easier on server load(?) and won't mess around with any session ids that vB may be utilising?.
I'd appreciate your thoughts.
And thanks for writing a great article.
•
•
Join Date: Mar 2005
Location: To-ron-to
Posts: 17
Reputation:
Rep Power: 4
Solved Threads: 0
Hi guys, have been following this thread here...really like the idea of this mod and would like to give it a shot on my forums.
appears the URL is broken!
•
•
•
•
Originally Posted by cscgal
Just to let everyone know, Keith was generous enough to have rewritten this tutorial combining my hack as well as Ted's.
http://www.daniweb.com/tutorials/12725.html
appears the URL is broken!
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- [Revised] vBulletin Mod_rewrite Tutorial (PHP)
- vBulletin mod_rewrite for vB 3.0.7 (Existing Scripts)
- vBulletin mod_rewrite for vB 3.0.7 (Growing an Online Community)
- vBulletin mod_rewrite in phpBB mod format (Existing Scripts)
Other Threads in the PHP Forum
- Previous Thread: Help Needed
- Next Thread: mysql_num_rows warning


Linear Mode