Rewrite parameters not matching...

New to mod_rewrite? This is a good place to start.

Rewrite parameters not matching...

Postby tbg130 » Mon Apr 11, 2005 2:58 pm


I have some confusion here and could use some help; new to this stuff.

I have a site that I want to build with SQL and ASP. The URLs will be as follows (for example): ... id=florida

I desire the following:

The problem is that my Rewrites are matching on the first case so it is returning the beachid variable instead of the cityid variable since the City Rewrite is before the Beach Rewrite...

RewriteCond Host: www\.mysite\.com
RewriteRule /([^/]+)(?:/([^/]+))\.html /info.asp\?cat=$1(?2&beachid=$2) [I,L]

RewriteCond Host: www\.mysite\.com/info.asp\?cat=cities
RewriteRule /([^/]+)(?:/([^/]+))\.html /info.asp\?cat=$1(?2&cityid=$2) [I,L]

I'd also eventually like to have the following:

How would I achieve that???

Any help or suggestions would be much appreciated; this problem will get bigger as I get some things going on the site (early stages) and will have tours, restaurants, etc. In other words, many categories (cat), many id's, and many sub id's...

Thanks for your help in advance!
Posts: 2
Joined: Sat Apr 09, 2005 12:53 pm

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 10 guests