| | |
vBulletin mod_rewrite
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
•
•
Originally Posted by Tdot
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!
StreetLessons.com - My Blog about Business, Life & Success!
I've got a new version of the tutorial out, and it handles multiple pages and more: http://www.daniweb.com/tutorials/tutorial22840.html
•
•
Join Date: Apr 2005
Posts: 1
Reputation:
Solved Threads: 0
Hi, I found a problem, why my apache didnot work mod_rewrite module, I have installed it, it is my httpd.conf files
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
######Load Php Module###########
Alias /vbb "C:/Apache_Group/Apache2/cgi-bin/vbb/"
<Directory "C:/Apache_Group/Apache2/cgi-bin/vbb/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
.htaccess files
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 ^post([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
RewriteRule ^forum([0-9]+).html$ forumdisplay.php?f=$1 [L]
The second question is:
My website is chinese font, if I use
<a href="$forum[url].html"><strong>$forum[title]</strong></a>
in my vbb template, it shows bad code, like this:
http://localhost/hoopchina/vbb/鲳国嗪�.html
How to resolve this problems? $forum[url].html
should I use <a href="forum$forum[forumid].html"> ?
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
######Load Php Module###########
Alias /vbb "C:/Apache_Group/Apache2/cgi-bin/vbb/"
<Directory "C:/Apache_Group/Apache2/cgi-bin/vbb/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
.htaccess files
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 ^post([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
RewriteRule ^forum([0-9]+).html$ forumdisplay.php?f=$1 [L]
The second question is:
My website is chinese font, if I use
<a href="$forum[url].html"><strong>$forum[title]</strong></a>
in my vbb template, it shows bad code, like this:
http://localhost/hoopchina/vbb/鲳国嗪�.html
How to resolve this problems? $forum[url].html
should I use <a href="forum$forum[forumid].html"> ?
•
•
Join Date: May 2005
Posts: 9
Reputation:
Solved Threads: 0
Hullo I'm new here and must say that I'm very impressed with this mod_rewwrite.
However, I have been looking at the most updated version and am a trying to incorporate this but am confussed by the following.
I have noted this:- Below are the PHP files that need to be edited. You will notice two lines at a time. The first line represents what to search for, and the second line represents what to replace it with.
So without further ado ...
$highlightwords = '&highlight=' . urlencode(implode(' ', $display['highlight']));
$highlightwords = '-' . urlencode(implode(' ', $display['highlight']));
$display['forums']["$key"] = "<a href=\"forumdisplay.php?$session[sessionurl]f=$forumid\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';
$display['forums']["$key"] = "<a href=\"forum$forumid.html\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';
[/html]
showthread.php
[html]$highlightwords = iif($goto, '&', '&') . 'highlight=' . urlencode($_GET['highlight']);
$highlightwords = '-' . urlencode($_GET['highlight']);
exec_header_redirect("showthread.php?$session[sessionurl_js]p=$getlastpost[postid]$highlightwords#post$getlastpost[postid]");
exec_header_redirect("threadedpost$getlastpost[postid]$highlightwords.html#post$getlastpost[postid]");
In the above I do not know if I should delete 1 line and add several.
Jezella
However, I have been looking at the most updated version and am a trying to incorporate this but am confussed by the following.
I have noted this:- Below are the PHP files that need to be edited. You will notice two lines at a time. The first line represents what to search for, and the second line represents what to replace it with.
So without further ado ...
$highlightwords = '&highlight=' . urlencode(implode(' ', $display['highlight']));
$highlightwords = '-' . urlencode(implode(' ', $display['highlight']));
$display['forums']["$key"] = "<a href=\"forumdisplay.php?$session[sessionurl]f=$forumid\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';
$display['forums']["$key"] = "<a href=\"forum$forumid.html\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';
[/html]
showthread.php
[html]$highlightwords = iif($goto, '&', '&') . 'highlight=' . urlencode($_GET['highlight']);
$highlightwords = '-' . urlencode($_GET['highlight']);
exec_header_redirect("showthread.php?$session[sessionurl_js]p=$getlastpost[postid]$highlightwords#post$getlastpost[postid]");
exec_header_redirect("threadedpost$getlastpost[postid]$highlightwords.html#post$getlastpost[postid]");
In the above I do not know if I should delete 1 line and add several.
Jezella
![]() |
Similar Threads
- [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
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions simple sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube







