Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Ezilon Directory   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 02-26-2004, 05:46 PM   #1 (permalink)
Inactive
 
Join Date: 10-13-03
Location: School....
Posts: 842
iTrader: 0 / 0%
Latest Blog:
None

GEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really nice
Send a message via AIM to GEWbert
mod_rewrite problem....

ok, put this up today, and now whenever i go to click on a forum it gives me a 404. the link to each forum is something like http://www.webmaster-cafe.com/forum/forum1.php.

given what i know, i'm pretty sure this should be .html, not php.

a copy of the mod is below, plus the .htacess. and it maybe possible i put the .htacess in the wrong place? its in the forum directory.

[code:1:41f4aacf4f]################################################## ############
## MOD Title: mod_rewrite
## MOD Author: wGEric < eric@egcnetwork.com > (Eric Faerber) http://eric.best-1.biz
## MOD Description: Use mod_rewrite on your board. It converts your dynamic links to something
## more Search Engine Friendly
## MOD Version: 1.0.0
##
## Installation Level: Easy/
## Installation Time: 10 Minutes
## Files To Edit: includes/page_header.php
## includes/page_footer.php
## .htaccess (may need to)
## Included Files: .htaccess (may need to use)
################################################## ############
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
################################################## ############
## Author Notes:
## This MOD requires that mod_rewrite is enabled on your server and
## supports .htaccess.
##
## If your server doesn't support .htaccess you will need to add the
## rewrite rules to your server configuration. I will not help you
## do this. You will be on your own.
##
## If you already have a .htaccess file in the main directory of your,
## you will need to add the contents of the .htaccess file that is included
## to your exsisting file.
##
## If you don't have a .htaccess file in the main directory of your site
## you will need to copy the one that is included with this MOD.
##
################################################## ############
## MOD History:
##
## 2004-01-12 - Version 1.0.0
## - First Release
##
################################################## ############
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
################################################## ############


#
#-----[ COPY ]------------------------------------------
#
# Only do if you don't already have a .htaccess file in the main directory
# of your site. See Author Notes for more information
#

copy .htaccess to .htaccess


#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php


#
#-----[ FIND ]------------------------------------------
#
# Note: this line has been shortened. The full line is
# $template->set_filenames(array(
# 'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl')
# );
#
$template->set_filenames(array(
'overall_header' =>
);

#
#-----[ AFTER, ADD ]------------------------------------------
#

ob_start();
function replace_mod_rewrite($s)
{
$urlin = array(
"'(?<!/)viewforum.php\?f=([0-9]*)&amp;topicdays=([0-9]*)&amp;start=([0-9]*)'",
"'(?<!/)viewforum.php\?f=([0-9]*)&amp;mark=topics'",
"'(?<!/)viewforum.php\?f=([0-9]*)'",

"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;view=previous'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;view=next'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;view=newest'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;postdays=([0-9]*)&amp;postorder=([a-zA-Z]*)&amp;start=([0-9]*)'", "'(?<!/)viewtopic.php\?t=([0-9]*)&amp;start=([0-9]*)&amp;postdays=([0-9]*)&amp;postorder=([a-zA-Z]*)&amp;highlight=([a-zA-Z0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&amp;start=([0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)'",
"'(?<!/)viewtopic.php\?p=([0-9]*)'");

$urlout = array(
"viewforum\\1-\\2-\\3.php",
"mforum\\1.php",
"forum\\1.php",

"ptopic\\1.php",
"ntopic\\1.php",
"newtopic\\1.php",
"ftopic\\1-\\2-\\3-\\4.php",
"ftopic\\1-\\2-\\3-\\4-\\5.php",
"ftopic\\1-\\2.php",
"ftopic\\1.php",
"sutra\\1.php");

$s = preg_replace($urlin, $urlout, $s);

return $s;
}

#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php

#
#-----[ FIND ]------------------------------------------
#
$db->sql_close();

#
#-----[ AFTER, ADD ]------------------------------------------
#

$contents = ob_get_contents();
ob_end_clean();
echo replace_mod_rewrite($contents);
global $dbg_starttime;


#
#-----[ FIND ]------------------------------------------
#
$gzip_contents = ob_get_contents();
ob_end_clean();

#
#-----[ AFTER, ADD ]------------------------------------------
#


echo replace_for_mod_rewrite($contents);
global $dbg_starttime;

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM [/code:1:41f4aacf4f]

.htaccess

[code:1:41f4aacf4f]RewriteEngine On
RewriteRule ^forums.* /index.php


RewriteRule ^viewforum([0-9]*)-([0-9]*)-([0-9]*).* /viewforum.php?f=$1&topicdays=$2&start=$3
RewriteRule ^mforum([0-9]*).* /viewforum.php?f=$1&mark=topic
RewriteRule ^forum([0-9]*).* /viewforum.php?f=$1

RewriteRule ^ptopic([0-9]*).* /viewtopic.php?t=$1&view=previous
RewriteRule ^ntopic([0-9]*).* /viewtopic.php?t=$1&view=next
RewriteRule ^newtopic([0-9]*).* /viewtopic.php?t=$1&view=newest
RewriteRule ^ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* /viewtopic.php?t=$1&postdays=$2&postorder=$3&start= $4
RewriteRule ^ftopic([0-9]*)-([0-9]*)-([0-9]*)-([a-zA-Z]*)-([a-zA-Z]*).* /viewtopic.php?t=$1&start=$2&postdays=$3&postorder= $4&highlight=$5
RewriteRule ^ftopic([0-9]*)-([0-9]*).* /viewtopic.php?t=$1&start=$2
RewriteRule ^ftopic([0-9]*).* /viewtopic.php?t=$1
RewriteRule ^sutra([0-9]*).* /viewtopic.php?p=$1[/code:1:41f4aacf4f]
GEWbert is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 02-27-2004, 04:49 AM   #2 (permalink)
Inactive
 
Join Date: 10-13-03
Location: School....
Posts: 842
iTrader: 0 / 0%
Latest Blog:
None

GEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really nice
Send a message via AIM to GEWbert
never mind, i got it working myself
GEWbert is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-06-2004, 05:49 PM   #3 (permalink)
Inactive
 
Join Date: 10-13-03
Location: School....
Posts: 842
iTrader: 0 / 0%
Latest Blog:
None

GEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really niceGEWbert is just really nice
Send a message via AIM to GEWbert
well, i'm having a similar problem now.

whenever i try to go to a second page, it redirects me to the intial page....

i used http://www.phpbb.com/phpBB/viewtopic.php?p=851615

i did have this fixed, but then i screwed the forum up, and lost it....
GEWbert is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-07-2004, 01:23 PM   #4 (permalink)
Inactive
 
Join Date: 02-07-04
Location: AZ
Posts: 698
iTrader: 0 / 0%
Latest Blog:
None

RonHollingsworth is a jewel in the roughRonHollingsworth is a jewel in the roughRonHollingsworth is a jewel in the roughRonHollingsworth is a jewel in the roughRonHollingsworth is a jewel in the roughRonHollingsworth is a jewel in the roughRonHollingsworth is a jewel in the rough
Send a message via ICQ to RonHollingsworth Send a message via AIM to RonHollingsworth Send a message via MSN to RonHollingsworth Send a message via Yahoo to RonHollingsworth
So what's the word on this Geoff? I installed this exact same MOD and I got the exact same error you did. You said you got it working. What did you go? This is one of the easiest MODs I've installed so I'm pretty sure it's not me.
RonHollingsworth is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_rewrite problem ottodo Web Hosting Forum 12 08-23-2006 01:45 AM
mod_rewrite Help ToddW SEO Forum 3 07-07-2006 05:33 PM
mod_rewrite problem Limit Coding Forum 10 06-08-2004 02:05 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 06:59 AM.
© Copyright 2008 V7 Inc