[Catalyst] 404 Not Found

Michael Reece mreece at vinq.com
Thu Dec 21 17:59:10 GMT 2006


i've been using something like the following, which may work for you:

     DocumentRoot /path/to/root/static/

     ## Next, alias /static/ back to the DocumentRoot so /static/foo  
comes from the static/ directory.
     Alias "/static/" /path/to/root/static/

     RewriteEngine On
     ## Rewrite known static files to /static/ which (because of the  
above Alias) will be served from DocumentRoot
     RewriteRule ^/favicon.ico /static/favicon.ico [L,R]
     RewriteRule ^/robots.txt /static/robots.txt [L,R]

     <Location />
         SetHandler perl-script
         PerlHandler MyApp
     </Location>

     <LocationMatch "^/(static|img)/">
         SetHandler default-handler
     </LocationMatch>


On Dec 21, 2006, at 10:17 AM, Octavian Rasnita wrote:

>>
>> Why even allow apache to know that root/ exists?  Set the docroot to
>> root/static/ or something.
>
> I wanted to do that, but I have seen that the file favicon.ico is  
> put in /root, and I thought that this directory should be defined  
> as DocumentRoot in httpd.conf because of that.
> Of course I can move the file favicon.ico, but I wanted to use the  
> most "default" configuration.
>
> Teddy
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/ 
> catalyst at lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/

---
michael reece :: software engineer :: mreece at vinq.com





More information about the Catalyst mailing list