Skip to content

Rewrites

Gruxi supports rewrite functions that can modify incoming requests before they are processed. This is useful for URL rewriting, internal routing, and similar request transformations.

Rewrite functions are configured per site, allowing granular control over how requests are handled.

All rewrite functions are predefined, which makes them simple to apply in the admin portal.

By default, Gruxi only serves static files that exist on the filesystem.

Supported rewrite functions

OnlyWebRootIndexForSubdirs

Checks whether the request targets an existing file. If it does, Gruxi serves the file. Otherwise, it rewrites the request to the index file in the web root (for PHP sites, typically index.php).

This rewrite function is required for WordPress, Laravel, and similar applications that handle their own routing.