geektron has asked for the wisdom of the Perl Monks concerning the following question:
i want to take:
and turn them into:www.mydomain.com/subDir/index.cgi?rm=foo - or - www.mydomain.com/subDir/index.cgi?rm=bar
and my ( paltry ) attempt at rewrite ( in .htaccess for subDir ):www.mydomain.com/subDir/foo www.mydomain.com/subDir/bar
which only works without the trailing slash and is going to be unbearable to maintain if i have to put in lines for every run_mode ....RewriteEngine On + + RewriteCond %{REQUEST_URI} sale RewriteRule ^(.*) index.cgi?rm=$1 [L] RewriteRule ^(.*)\/ index.cgi?rm=$1 [L]
i know there's got to be a better way. i've read the rewriting guide but it's not clicking ....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mod_rewrite woes
by The Mad Hatter (Priest) on Jan 29, 2004 at 23:21 UTC | |
by geektron (Curate) on Jan 30, 2004 at 01:04 UTC | |
by The Mad Hatter (Priest) on Jan 30, 2004 at 01:11 UTC | |
by geektron (Curate) on Jan 30, 2004 at 02:08 UTC | |
|
Re: mod_rewrite woes
by The Mad Hatter (Priest) on Jan 29, 2004 at 20:44 UTC | |
by geektron (Curate) on Jan 29, 2004 at 22:15 UTC |