added htaccess

This commit is contained in:
viraladmin 2026-07-27 16:14:45 -06:00
parent c5c467c814
commit 6cdb3da101
2 changed files with 30 additions and 0 deletions

View File

@ -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

10
public/.htaccess Normal file
View File

@ -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>