in reply to Re: Perl file names and extensions
in thread Perl file names and extensions
davorg, thanks for this example. I have seen URL's like this, but could not figure out how it worked. However, I'm still not sure of the mechanics.
I assume that the index.cgi is in the directory "login" in your example, but does the lone "?" fire the cgi without the need of a program name, as in: /login/index.cgi?mode=new. I.e., the "index.cgi" is not needed, right?
This is the first time I've been exposed to mod_rewrite and have done some Super Searching and found this by Mad Hatter. Would something like this work with your example?
RewriteEngine on RewriteBase /subDir/ # only redirect if the file requested isn't index.cgi # capture anything else and redirect it to index.cgi RewriteCond %{REQUEST_FILENAME} !^index.cgi RewriteRule ^(.+)/?$ index.cgi?rm=$1 [L]
Well, I'll try this to see if it works differently or better than my usual .htaccess:
Options +ExecCGI SetHandler cgi-script
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Perl file names and extensions
by BUU (Prior) on Aug 03, 2004 at 23:17 UTC | |
by bradcathey (Prior) on Aug 04, 2004 at 02:03 UTC |