Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL Rewriting

Status
Not open for further replies.

Dronealone

IS-IT--Management
Mar 13, 2002
64
GB
Hi,

I'm terrible at regex, but trying to learn.

I have used mod_rewrite to rewrite a very simple URL, it works fine for one variable but not sure how to do it for two. Here it is:

RewriteEngine On
RewriteRule /range([0-9]+).stm /rangepage.php?range=$1

I need to add a second var to this called offset which I am happy to appear in the query string of /range123.stm?offset=2

Can somebody show me how to do this please?

Thanks!
 
Well, how do you want to represent offset in the source URL?

Maybe like this:

Code:
RewriteRule /range([0-9]+).stm?offest=([0-9]+) /rangepage.php?range=$1&offset=$2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top