Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get rid of .htaccess ? #9709

Closed
FathiBenNasr opened this issue Jun 1, 2018 · 2 comments
Closed

How to get rid of .htaccess ? #9709

FathiBenNasr opened this issue Jun 1, 2018 · 2 comments

Comments

@FathiBenNasr
Copy link

.htacces has always known to be a performance bottleneck when using apache, so is there a way to get rid of it and still have nice urls ? I am facing too many internal server errors and my nextcloud installation is slow especially at login, so i would like to use nextcloud without the need of .htaccess files.

TIA

@MorrisJobke
Copy link
Member

.htacces has always known to be a performance bottleneck when using apache, so is there a way to get rid of it and still have nice urls ? I am facing too many internal server errors and my nextcloud installation is slow especially at login, so i would like to use nextcloud without the need of .htaccess files.

Where did you get that information from? There are huge installations out there that run totally fine and that is definitely not a performance bottleneck. To get rid of it you could also copy the content from the .htaccess to the apache config itself, but be aware that it could be that you need to check if it was updated with never versions and then also update the copy in your apache config.

@FathiBenNasr
Copy link
Author

It is well explained here https://haydenjames.io/disable-htaccess-apache-performance/
Here is an excerpt:
"There are two main reasons to avoid the use of .htaccess files.

The first of these is performance. When AllowOverride is set to allow the use of .htaccess files, httpd will look in every directory for .htaccess files. Thus, permitting .htaccessfiles causes a performance hit, whether or not you actually even use them! Also, the .htaccess file is loaded every time a document is requested.

Further note that httpd must look for .htaccess files in all higher-level directories, in order to have a full complement of directives that it must apply. (See section on how directives are applied.) Thus, if a file is requested out of a directory /www/htdocs/example, httpd must look for the following files:

/.htaccess
/www/.htaccess
/www/htdocs/.htaccess
/www/htdocs/example/.htaccess

And so, for each file access out of that directory, there are 4 additional file-system accesses, even if none of those files are present. (Note that this would only be the case if.htaccess files were enabled for /, which is not usually the case.)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants