Apache “rewrite rule” for REST API

Here’s how you can configure your Apache webserver for a REST API, without using rewrite rules (thus: you don’t need the rewrite engine). Simply add the following line to your <VirtualHost>: AliasMatch ^/api/rest/v1/(.*)$ /var/www/[mywebsite]/htdocs/api/rest/v1/index.php In index.php, you can read the parameters like so: &lt;?php    $path = preg_replace('~^/rest/v1/~', '', $_SERVER['SCRIPT_NAME']);    $parts = explode('/', $path); […]

Configuring DiskStation for multiple websites

The Synology DiskStation comes with the Apache webserver. The “Web Station” functionality allows you to host a website. You can even run multiple virtual hosts. These “default” virtual hosts, however, cannot be configured in detail. But it is very well possible to host multiple websites on a single DiskStation, while still being able to configure […]