Jump to content

Recommended Posts

Posted

Hi,

I've been using PW for a while now, and I've been happy with it so far, but I've decided to stop using .htaccess files on my server as it severely impacts performance. I've tried moving the contents of PW's .htaccess file into my website's virtual host config file. The problem is, once I do that, I can't access my website, as the server just throws 400 Bad Request errors all over the place.

So, is there a way to get PW to run without having an .htaccess file in place, that is, having its directives in an Apache virtual host config file instead?

Thank you, and happy new year!

Posted

Hi pwired,

No, you don't need an .htaccess file to secure your site. As per the official documentation:

Any directive that you can include in a .htaccess file is better set in a Directory block, as it will have the same effect with better performance.

In other words, anything you can do in an htaccess file you can do in your Apache config files. The official documentation also discourages the use of .htaccess files:

You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server.

  • Like 3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...