Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cabbit

macrumors 68020
Original poster
Jan 30, 2006
2,128
1
Scotland
i am using a mod rewrite rule in my .htaccess document, however when we get into tiers past 1 it fails.
Say i have domain.com/forum as domain.com?page=forum

RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?page=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?page=$1

But say i want domain.com/forum/forumdisplay/12 where that is domain.com?page=forum&sub=forumdisplate&topic=12

how do i go about this?

my thoughts are on something like this
RewriteRule ^forum/(.*)-([0-9]+)-([0-9]+)\.html$ index.php?page=$1&sub=$2&topic=$3 [L]


link
 
Give this a go,
Code:
RewriteRule ^([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/([0-9]+)$ index.php?page=$1&sub=$2&topic=$3
 
I get a 404 page not found with that.

That links points to localhost.

Can you tell what the result was, the format?

Also, I notice in your attempt you have a html portion, that doesn't seem to match up with what you described. Did you leave something out of your description of what you need perhaps?
 
That links points to localhost.

Can you tell what the result was, the format?

Also, I notice in your attempt you have a html portion, that doesn't seem to match up with what you described. Did you leave something out of your description of what you need perhaps?

new link new link

sorry bout local host. ok it works as long as i have 3 values
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.