Is it possible to run Grav without the htaccess file?

I tried to run Grav using an apache config file but the Grav error screen came up and told me my htaccess file was missing and wouldn’t load the site. Can I tell it to run without htaccess?

Not if you want to have any routing. You just need to ensure the .htaccess file is there. It’s included in the zip file. If you manually copied the files from the zip to another location, and don’t have hidden files visible, you might of missed it.

The best option is to extract the zip file directly into the webroot or subdirectory where you intend to use it.

Yeah its fine, I took it out cause I wanted to run it without an htaccess to stop the requests that occur (i.e. apache checks every single directory for every request). It’s not really an issue as the sites I’m using for Grav aren’t getting 1000 hits a second, but I just wanted to see if it would work. The problem with having it there and blank is apache still then checks every directory per request - apache themselves recommend not using it for performance issues on large traffic sites - http://wiki.apache.org/httpd/Htaccess

Frankly you are not going to see any real issue with performance with Grav (even with an .htaccess). We’ve focused on performance and optimizations from the very start. I think you’ll find it’s about the most efficient and performant CMS out there.

If your concerned with performance try Nginx. I can get well over 700req/sec on my mac with a Grav site under Nginx, and even over 500req/sec with Apache 2.4.

Yep thanks. As I said, I was speculating - I don’t actually think it will ever be an issue. Just playing around. And yes, Grav is the fastest thing I’ve ever used.

Thanks!

One other thing I didn’t mention because i’ve never tried it, is you can move the htaccess rules into the apache configuration files, specifically a vhost section. Then you can turn off allow overrides to stop any .htaccess from even getting picked up.

This is the preferred approach for optimal performance, but i doubt you would see much if any real world difference. Your getting into nit-picking territory :slight_smile: Nginx is a better option if your considering this.

Agreed :smiley:

Apache is the lazy man’s web server though :smiley: so I probably shouldn’t be nit-picking