Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get Capistrano to include .htaccess files in deployments?

I'm trying to get Capistrano deploying my web app. I'm deploying a php app using remote_cache from a git repo to a Linux host via a Windows computer. Everything is deploying okay except that it doesn't copy over the .htaccess files. I'm new to Capistrano and Ruby, so any pointers would be helpful!

Capistrano 2.5.18 with Ruby 1.8.6 on Windows

like image 959
Jon Avatar asked Dec 05 '25 15:12

Jon


1 Answers

remove htaccess first manually, then remove/symlink every time you deploy

  desc "remove .htaccess"
  task :htaccess do
    run "rm #{path}/.htaccess"
    run "ln #{path}/.htaccess #{release_path}/public/.htaccess"
  end

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!