This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: Simple RewriteMap and Rule help needed
Author
Message |
higgsy
Groupie


Joined: 10 December 2004
Location: United Kingdom
Posts: 76
Posted: 31 March 2011 at 6:27pm

Hi,

Im just trying out Ape before I can tell whether it meets the needs of a project that were working on. I'm trying to setup a rule, which says:

If the following url is found
http://www.mywebsite.com/products/product-title/

Rewrite the url to /test.asp?Product=<ProductID>

So i tried the following:

RewriteEngine On
RewriteBase

DBDriver odbc
DBDParams "Driver={Microsoft Access Driver (*.mdb)}; DBQ=D:\website\db\db.mdb"
DBDPrepareSQL "SELECT intID FROM tblProducts WHERE strLink = @KEY" getProductID

SetEnv mod_seo

RewriteMap ProductID dbd:getProductID

RewriteRule ^/products/(.*)/$ /test.asp\?Product=${ProductID:$1|NOT_FOUND} [L,NC]

But i always get the error, Too few parameters. Expected 1.

Im passing in a string, and hoping to get back an int. Is this possible?

Thanks
Al
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 05 April 2011 at 3:45am

Hello,

Please, provide information on the build that you have installed and the error code that you get. In case it is not the latest build, please install the latest available, it converts numeral into string and back correctly.
The latest build of Ape can provide logs for this issue. Please, see FAQ (enabling logging is same for ISAPI_Rewrite and Ape)

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