URL Rewrites

Files

/.htaccess

/nginx.conf

Introduction

Wave Framework includes files for two of the supported web servers: Apache and Nginx. Directives and/or configuration from these files should be loaded with the web server.

Apache

Apache commands are stored in .htaccess file. This file loads the RewriteEngine, which is used redirect all HTTP requests, except those to /static/ folders and those that are PHP files itself, to Index Gateway stored in /index.php. These commands - and Wave Framework itself - only work when RewriteEngine is supported on the web server.

On most server configurations you should not have to do anything to get the /.htaccess file working, as Apache will automatically execute commands from that file. If this does not work however, then these commands should be set to Apache as directives directly or allow Apache to just execute /.htaccess files in the project folder.

Nginx

Wave Framework also supports Nginx and recommended configuration is stored in /nginx.conf file. This file is never automatically loaded by Nginx and commands and configuration from this file should be set to Nginx server configuration. These commands redirect all HTTP requests, except those to /static/ folders and those that are PHP files itself, to Index Gateway stored in /index.php. These commands - and Wave Framework itself - only work when URL rewriting is supported.

This configuration file should not replace your Nginx configuration. You should merely take the relevant parts of this configuration example and apply it to your Nginx configuration file.