Try putting following lines in your virtualhost to handle redirecting with MP2...
ReWriteEngine on ReWriteRule ^(.*)/$ $1/index.html ReWriteRule ^$ index.html Regards, Vimal -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of fixed Sent: Monday, March 24, 2008 2:20 PM To: Mason-users@lists.sourceforge.net Subject: [Mason] Mason Setup with DirectoryIndex and Content Type I'm having a bit of a problem configuring Apache with Mason and having the DirectoryIndex to work. My whole objective is to have URLs (which won't exist) such as: http://localhost/mondays http://localhost/tuesdays Therefore, my dhandler is: <%init> my $day = (split /\//, $r->uri)[-1]; $m->comp("process_days.mpl", day => $day); </%init> This all works fine - however, my http://localhost/ doesn't load index.html even though in my Apache config I have DirectoryIndex set up. My setup: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8c mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.8 My Apache config: <VirtualHost localhost:80> ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/apache/htdocs/localhost.com PerlSetVar localhost.com <Location /> DirectoryIndex index.html DefaultType text/html SetHandler perl-script PerlHandler MyApp::Mason </Location> </VirtualHost> Going to http://localhost has the browser download the file automatically with the HTML content. Must I really put $r->content_type('text/html'); in the dhandler file? Also, if I set up /admin/index.html and pull up http://localhost/admin/, it does not pull the index.html file. I appreciate any input - terribly confused. Thank you Ogden ------------------------------------------------------------------------ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users