Michael Petnuch wrote:
> Hello,
>
> I am currently using CA::Dispatch to shell out my webpages under
> mod_perl. My apache conf looks like this:
>
> <VirtualHost *:80>
>
> ... snip ...
>
> # So that all request to petnuch.com get sent to the dispatcher
> RewriteEngine On
> ReWriteRule ^/$ /app/main/main [R]
>
> <Location />
> # If an actual file or directory is requested, serve directly
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /(.*) /app/$1
> </Location>
>
> <Location /app >
> SetHandler perl-script
> PerlHandler CGI::Application::Dispatch
> PerlSetVar CGIAPP_DISPATCH_PREFIX MPWebsite
> PerlSetVar CGIAPP_DISPATCH_DEFAULT /main
> </Location>
>
> </VirtualHost>
>
>
> So urls for my website look like this:
> http://www.petnuch.com/app/module/runmode. However, I would like them
> do just look like this: http://www.petnuch.com/module/runmode. I can do
> this by putting the Dispatch stuff under the '/' location, however, them
> I have the problem of my css files and images (which are actually under
> '/') not being served. I figure there is some mod_rewrite magick that
> does this but I am not really versed with it.
See if my above suggestion as a rewrite rule will work. But you must make sure
that you don't have any directories that match your module names in your
document root for this to work. I personally like using /app for any dynamic
stuff since there's no chance for it to break anything if someone names a
directory or a module differently.
--
Michael Peters
Developer
Plus Three, LP
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]