-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
|
||
# Hackaround to combine astro with PHP | ||
RewriteCond %{REQUEST_URI} ^/api/ | ||
RewriteRule ^api/(.*)$ api/index.php?p=$1 [QSA,L] | ||
|
||
# If not api route, then deliver static contents | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule ^(.*)$ $1 [L] | ||
</IfModule> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## How glue works? | ||
|
||
As discussed above, the project incoperates both PHP and astro. | ||
I accomplished this with `.htaccess` and playing with *Apache2* | ||
configuration. | ||
|
||
As of this commit(check file's commit hash), the project requires | ||
a special directory structure of the webroot... | ||
|
||
- a directory with name `/api` and contains all the PHP stuff | ||
- root directory is then populated with astro build artifacts. | ||
|
||
> refer .htaccess file for logic of the **glue** |