added htaccess
This commit is contained in:
parent
c5c467c814
commit
6cdb3da101
20
README.md
20
README.md
|
|
@ -21,6 +21,26 @@ development, PHP's built-in server can be started from the project root:
|
|||
php -S 127.0.0.1:8080 -t public public/index.php
|
||||
```
|
||||
|
||||
The included `public/.htaccess` routes Apache and normal Hestia
|
||||
Nginx-to-Apache installations through `public/index.php`. Apache must have
|
||||
`mod_rewrite` enabled and permit `.htaccess` overrides.
|
||||
|
||||
For a pure Nginx or Nginx-to-PHP-FPM installation, add this inside the domain's
|
||||
server configuration:
|
||||
|
||||
```nginx
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
```
|
||||
|
||||
After changing an Nginx configuration, validate and reload it:
|
||||
|
||||
```bash
|
||||
sudo nginx -t
|
||||
sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
The version root is available at `GET /api/v1`.
|
||||
|
||||
## Wallet Authentication
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
DirectoryIndex index.php
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
# Serve real public assets directly and send API routes to the front controller.
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^ index.php [QSA,L]
|
||||
</IfModule>
|
||||
Loading…
Reference in New Issue