Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite syntax help

         

FiRe

11:16 am on Aug 15, 2007 (gmt 0)

10+ Year Member



At the moment i have this:

RewriteRule ^tag/(.*) view_tag.php?id=$1

[localhost...]

Which works fine. But I would like to add some page numbering like this:

[localhost...]
>>>
view_tag.php?id=$1&page=$2

How can I modify the rewriterule to accept "tag/internet" and also "tag/internet?page=2" (the tag wont always be internet by the way)? Thanks in advanced :)

[edited by: FiRe at 11:17 am (utc) on Aug. 15, 2007]

jdMorgan

2:43 pm on Aug 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See the RewriteRule [QSA] flag to allow mod_rewrite to append new query info to the existing query string, rather than replacing it.

Jim