keiusui has asked for the wisdom of the Perl Monks concerning the following question:
http://www.mydomain.com/Bill_Gates
They are looking at information about Bill Gates, but they are really calling a script like:
http://www.mydomain.com/cgi-bin/display.pl?name=Bill_Gates
The RewriteRule looks like this:
RewriteRule ^([^/]+)?$ /cgi-bin/display.cgi?name=$1 [L]
This works well, but the htaccess also treats "http://www.mydomain.com/cgi-bin" as a username rediecting it to "http://www.mydomain.com/cgi-bin/display.cgi?name=cgi-bin".
How would I write the RewriteRule so that it calls the Perl script in all cases except when the username is "cgi-bin", "images", or some other common directory, while still treating names like "Bill_Gates" or "Steve_Jobs" as usernames?
Thanks in advance for any help on this.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: using htaccess to call a perl script
by Anonymous Monk on Feb 26, 2010 at 23:59 UTC | |
Re: using htaccess to call a perl script
by skx (Parson) on Feb 27, 2010 at 11:49 UTC | |
Re: using htaccess to call a perl script
by Skriptke (Acolyte) on Feb 28, 2010 at 10:55 UTC |