Yeah, ok, this isn't completely on topic. Please humour me (or at least flame me politely). I need to redirect people to a perl-CGI script....
I have written a perl script that generates a series of active web
pages. It's in the cgi-bin and works fine when accessed directly eg:
http://www.example.com/cgi-bin/index.pl
So, now I want to redirect anyone going to http://www.example.com to the above link instead.
I thought simply putting Redirect permanent index.* /cgi-bin/index.pl
in a .htaccess file would work - but it doesn't seem to do anything.
Googling about seems to say it should work.
My ISP does allow .htaccess files as I'm using them elsewhere for auth
purposes.
What am I doing wrong? Or what should I be doing instead?
Input appreciated.
Are you using Apache, and what version?
It appears that the second portion of the Redirect must be an absolute link, and I don't know that the first can be a regex/glob constuct... for that you appear to need RedirectMatch.
http://httpd.apache.org/docs/mod/mod_alias.html#redirect
Alternatively,
I believe you can put Rewrite rules into a .htaccess, at least depending on the base server config, and I use the following in my apache conf to do exactly what you state:
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^/$ /cgi-bin/index [R,L] </IfModule>
Of course that is also assuming that mod_rewrite is available....
HTH,
http://danconia.org
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>