This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: redirect with some paramerters rewriten
Author
Message |
alindzon
Newbie


Joined: 01 September 2011
Location: Canada
Posts: 3
Posted: 04 September 2011 at 9:08pm

I have had great success on simple pages that use one paramter, simple and quick, great product and easy to use.

The only reason it works for me is I was able to modify one of your examples, and it was simple enough that even though I don't understand the syntax used, it still works.

Now I want to tackle a page with many parameters, a number of which are unknown and vary.  But there are two paramters, that are always available, and that I want to replace with words.  Can anyone show me the syntax for this and perhaps break down what the portions mean.

Desired end result

URL to enter

/z/A/B/parameters-to-keep_param1_param2.htm

URL to map to

/x.asp?a=param1&b=param2&parameters-to-keep

Sorry, I just can't wrap my head around the syntax, and would really appreciate some assistance.

 

 

Back to Top Visit alindzon's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 06 September 2011 at 5:46am

Hello,

The rule below fits the very structure you've provided.
Please, try using the following for /z/A/B/parameters-to-keep_param1_param2.htm

Code:
RewriteEngine on
RewriteBase /

RewriteRule ^z/([^/]+)/([^/]+)/([^/_]+)_([^/_]+)_([^/_]+)$ /x.asp?$1=$4&$2=$5&$3 [NC,L]


Regards
Andrew
Back to Top
 
alindzon
Newbie


Joined: 01 September 2011
Location: Canada
Posts: 3
Posted: 06 September 2011 at 10:30am

I ended up simplifying the approach to just allow me to put in anything and to pass all the parameters.  Here is what I ended up using.

So now I can pass any list of parameters in any order, and they all flow through.  The text I place as the program name is ignored and replaced with the actual program name.  In my case you will end up with ManufacturerName_Category as the SEO optimized name for my search page.

RewriteRule ^z/[^?/]*\.asp(.?) ssdept.asp$1 [QSA]
see www.ashlin.ca for the results.

Back to Top Visit alindzon's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 08 September 2011 at 4:56am

I is what was expected? Or do you need any modifications?

Regards
Andrew
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version