Problems with RewriteMap MapType dbd

Continuing the discussion here:

MySQL + htaccess mod_rewrite?

Where I was asked to ask another question.

I added this to my httpd.conf file:

DBDriver mysql
DBDParams "host=*****,user=*****,pass=*****,dbname=*****"
RewriteEngine On
RewriteMap hrci "dbd:SELECT title FROM challenges WHERE id = %s"

When I tried restarting Apache, I got this error:

RewriteMap: file for map hrci not found:/dh/apache2/apache2-ps54462/dbd:SELECT title FROM challenges WHERE id = %s

It seems like he completely ignores the part dbdand tries to read it all as a file name. I really don't know what I'm doing wrong.

UPDATE

I tried to simplify this and just used a direct text file for the map:

RewriteMap hrci txt: /home/username/rewrite.txt

There is a text file in the root directory that simply contains the following:

232 + Pillar + + Autumn + LASO

And finally, I have a rewrite rule:

RewriteRule ^ ch ([0-9] {1,4}) (/)? $ http://reachchallenges.infectionist.com/challenge/ $ 1 / $ {hrci: $ 1} [R = 301, L]

, ch232 /challenge/232/The+Pillar+of+Autumn+LASO, /challenge/232/, . , , ?!?

0
1

, , dbd RewriteMap ( ), , apache 2.3+. apache2.2 .

+1

All Articles