Thanks for the reply Charlie. Can you give me any pointers as to how I would set this up, I don't have a lot of experience with Apache configuration - it's managed by our systems admins so I'm currently stuck with CGI at the moment.
I managed to get it working by using: $ENV{SCRIPT_NAME} = "/dir/my_app/" in myApp.pm Then in htaccess I have: AddHandler cgi-script .pl Options +ExecCGI IndexIgnore * RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.*)$ script/my_app.pl/$1 [L] The code in my original question was based on the documentation in the Apache Deployment info here: https://github.com/kraih/mojo/wiki/Apache-deployment. I really like Mojolicious but I find that some of the documentation can be confusing for someone that is relatively new to the framework. I guess that this is what this group is for though. Thanks again. On Tuesday, 11 October 2016 15:13:15 UTC+1, Charlie Brady wrote: > > > On Mon, 10 Oct 2016, StarX wrote: > > > I've got a Mojolicious app running under CGI, but my css and js files > are > > not being served from the pubic directory. > ... > > My URLs appear correctly in the page source as /dir/my_app/css/file.css > and > > /dir/my_app/js/file.js but clicking them in the source just displays the > > entire page content rather than the css/js. I'm not quite sure how to > > configure the rewrite correctly, can anyone help? > > I think you should configure apache so that those files are served > directly by apache, rather than attempt to have your application executed. > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+unsubscr...@googlegroups.com. To post to this group, send email to mojolicious@googlegroups.com. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.