Lana has asked for the wisdom of the Perl Monks concerning the following question:
Why do I need that? I have a MySQL database with keywords. When visitor clicks some link on my website, RewriteCond condition sends request to that ckw.cgi script with %{REQUEST_URI} as a query string. Script parses the request URI, search for keywords used in REQUEST_URI through database and returns 1 or 0. If it returns 1 - RewriteRule is applied for this link, elsif it returns 0 - no rules applied.<IfModule mod_rewrite.c> RewriteEngine On RewriteCond IF SCRIPT /home/cgi-bin/ckw.cgi\?%{REQUEST_URI} RETURNS 1 RewriteRule ^.*$ (rewrite rule goes here) [L] </IfModule>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting response from external script by Apache mod_rewrite condition
by moritz (Cardinal) on Feb 21, 2008 at 09:48 UTC | |
by Lana (Beadle) on Feb 21, 2008 at 18:34 UTC |