Skip to content
Advertisement

Remove file extension in apache 2.4

I want to refer to a page without the .php extension and not to use the .htaccess file, as a documentation says:

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.

Advertisement

Answer

You can write the configuration you want (a “rewrite rule” in your case I think) in the virtual host of your website to avoid the .htaccess. See the doc here https://httpd.apache.org/docs/2.4/en/vhosts/examples.html

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement