processwire-requests icon indicating copy to clipboard operation
processwire-requests copied to clipboard

PHP htaccess rewrites

Open clsource opened this issue 2 years ago • 2 comments
trafficstars

Short description of the enhancement

Include a processwire_rewrites.php file in index.php to allow PHP handle rewrites instead of .htaccess.

Optional: Steps that explain the enhancement

  1. Provide a processwire_rewrites.php file
  2. The user has to manually include it in index.php
  3. Configure webserver to send all requests to index.php

Current vs. suggested behavior

Current Only apache servers are officially supported.

Suggested Support any webserver by adding an optional include.

Why would the enhancement be useful to users?

Other webservers like YAWS can be used to serve Processwire.

This file gets included at the very beginning of ProcessWire's index.php file, and will perform rewrites and redirects, prior to full ProcessWire bootstrap.

Allowing using other webservers to have the same security levels of Apache, not having to manually migrate .htaccess rules.

Optional: Screenshots/Links that demonstrate the enhancement

  • This is were the idea came from Pantheon Rewrites
  • WPEngine deprecated .htaccess files https://wpengine.com/support/htaccess-deprecation/

clsource avatar Sep 08 '23 12:09 clsource

Similar request https://github.com/processwire/processwire-requests/issues/442

matjazpotocnik avatar Sep 08 '23 13:09 matjazpotocnik