Where do you put the file...htaccess in WAMP?



  • Where do you put the file...htaccess in WAMP? In the folder www or in the folder?



  • Simplified answer:.htaccess server's file is searched at every request in every folder starting with DocumentRoot of this site, usually with the root folder of the site, it's where index.php, index.html. Where the index is displayed, close and put it.

    Full answer:The apache configuration file (from 2.4 is mandatory) assigns processing rules .htaccess files. Instruction AllowOverride All in the relevant section.

    If the instructions are in place, the server will search the files on every request for it... .htaccess, not only in the current, but all the parent files. He's looking for him everywhere, but from DocumentRoot or another designated path.

    Most most of the platforms for the development of AllowOverride All are for everything, and since...htaccess works in any folder, you have to put it where it is needed. If not at the root of the site but inside, we'll check further in it from what path it's taking under rewrite rule.

    When deploying to the server on high-burden projects, the reduction of load is achieved, including the deactivation of all files .htaccess to the configuration file, which is read once.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2