# Test .htaccess in local Bedrock Trellis-powered environment?

**URL:** https://discourse.roots.io/t/test-htaccess-in-local-bedrock-trellis-powered-environment/10957
**Category:** trellis
**Tags:** nginx
**Created:** 2017-11-19T20:19:24Z
**Posts:** 3

## Post 1 by @cibulka — 2017-11-19T20:19:24Z

Could you recommend me how to test `.htaccess` functionality on my local Berock/Trellis-powered evironment?

To elaborate - my production server runs on Apache. I need to restrict some downloads (mostly PDFs) to logged-in users. It seems, that serving of uploaded files (by URLs such as `http://example.com/wp-uploads/2017/11/file.pdf`) does not concern Wordpress at all, so I need to intercept it with some sort of server tool. Would it be possible to test my approach on my local environment, which runs on Bedrock/Trellis (that uses, yes, NGINX and not Appache?).

Thanks in advance!

---

## Post 2 by @alwaysblank — 2017-11-19T20:54:28Z

Server management isn’t my forte, but I don’t think there’s any way to directly test an `.htaccess` configuration in NGINX.

If all you need to do is test the `.htaccess` rules, then I’d probably spin up a LAMP VM (I usually use [Scotch Box](https://github.com/scotch-io/scotch-box) for that because it’s super simple and pretty quick), and copy your WP install over to that for testing. If you’re going to need to continue developing on this site, though, you might want to consider switching away from Trellis to another VM that’s closer to your production server. IMO the major benefit to Trellis is that it allows you to easily make dev and prod servers that exactly match, and if you’re not doing that it seems like it’s just going to cause you problems.

---

## Post 3 by @cibulka — 2017-11-20T05:51:19Z

Thanks for your suggestions, @alwaysblank! I was hoping there could be some simpler way. If not, then yes, I guess my only option is to create another local environment for testing my `.htaccess` rules.
