[Israel.pm] (off-topic) Apache help

Shlomo Yona shlomo at cs.haifa.ac.il
Sun Dec 19 00:44:01 PST 2004


Hello,

Sorry for the non-Perl question.
I have a problem that I know how to solve with Perl, but
this time I need the problem to be solved by the Apache
web-server.

Apache wizards: This is a question for you:

Please consider the following ugly URLs

http://mila.cs.technion.ac.il/cgi-bin/mila.cgi.pl?f=english/resources/index.html
http://mila.cs.technion.ac.il/cgi-bin/mila.cgi.pl?f=hebrew/resources/index.html
http://mila.cs.technion.ac.il/cgi-bin/mila.cgi.pl?f=hebrew/index.html
http://mila.cs.technion.ac.il/cgi-bin/mila.cgi.pl?f=english/about/index.html

They refer to the following locations on the disk
(respectively):

/var/www/html/english/resources/index.html
/var/www/html/hebrew/resources/index.html
/var/www/html/hebrew/index.html
/var/www/html/english/about/index.html

And I would like those URLs not to be visible/known to
users. I would like the users to access such pages using the
following URLs (respectively):

http://mila.cs.technion.ac.il/website/english/resources/index.html
http://mila.cs.technion.ac.il/website/hebrew/resources/index.html
http://mila.cs.technion.ac.il/website/hebrew/index.html
http://mila.cs.technion.ac.il/website/english/about/index.html

Moreover, I would like Apache to be able to replace these

http://mila.cs.technion.ac.il/website/english/resources
http://mila.cs.technion.ac.il/website/hebrew/resources
http://mila.cs.technion.ac.il/website/hebrew
http://mila.cs.technion.ac.il/website/english/about

with these (I want apache to add "/index.html" at the end of
the URL and only then replace the URL to the ugly URL):

http://mila.cs.technion.ac.il/website/english/resources/index.html
http://mila.cs.technion.ac.il/website/hebrew/resources/index.html
http://mila.cs.technion.ac.il/website/hebrew/index.html
http://mila.cs.technion.ac.il/website/english/about/index.html


Can you please suggest the lines to add to the httpd.conf
that will allow me to do these tricks?

Thanks.

-- 
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/



More information about the Perl mailing list