Mobile app version of vmapp.org
Login or Join
Sarah324

: Alternative to .htaccess (due to bad performance) I've been told that .htaccess should be avoided when possible, as it reduces the server performance and new servers disable it or just don't

@Sarah324

Posted in: #Htaccess #Language #UrlRewriting

I've been told that .htaccess should be avoided when possible, as it reduces the server performance and new servers disable it or just don't implement it any more. I don't know how true this is, but if so I wish to find an alternative to rewrite my URLs.

What I use it for is just to convert URLs from example.com/page.php?lang=LANG to example.com/LANG/page.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sarah324

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

I've been told that .htaccess should be avoided when possible, as it reduces the server performance and new servers disables it or just don't implement it anymore.


The part about compatibility is absolutely not true; the part about performance is kinda true but probably irrelevant for you.

What the person you quote was probably talking about is that it's faster to put Apache rules into the central configuration instead of .htaccess files: The former are loaded once into the Apache process, and don't have to be looked up on every request.

However, this is not possible on shared hosting - using .htaccess files is the only option you have there.

If you have the opportunity to put configuration options into the central configuration (i.e. you have admin access to the server), and you're worried about performance, do it. But chances are this is a non-issue really. There are lots of things to optimize in a web application before it is worth looking at this.

For simple rewriting tasks on a low- to normal-traffic web site, .htaccess is still the way to go.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme