Comments (2)
ok i figured out how to do it, i just added my index.html file and _h5ai to the opper folder, and then i made a new index.php files
<?php
$requestUri = $_SERVER['REQUEST_URI'];
if ($requestUri === '/' || $requestUri === '/index.html') {
readfile('index.html');
} elseif (strpos($requestUri, '/<opper folder>') === 0) {
$h5aiPath = __DIR__ . '/<the original index.php file>.php';
if (file_exists($h5aiPath)) {
include $h5aiPath;
} else {
http_response_code(404);
echo 'Not Found';
}
} else {
http_response_code(404);
echo 'Not Found';
}
this loads both the index.html page (and makes it the first to load) and loads h5ai so when you're on https://domain.com
does it just load the index.html page and when you're on https://domain.com/<any of the sub folders>
does it go to that subfolder
from h5ai.
nvm it stopped working and started to redirect again :/
from h5ai.
Related Issues (20)
- An Empty Page Was Shown With PHP 8.1
- Changing theme in a subdirectory
- support for external configuration
- Is there a way to use a custom font? HOT 1
- trailing slashes on img tags now cause HTML5 validation failure
- support for sending HTTP "last-modified" header based on directory modification date?
- errors when moving from PHP 7.4 to 8.1 HOT 2
- how can I extern this function? send file to kindle.
- Only displays info page (apache2 behind nginx)
- NGINX permissions? HOT 2
- TS Stream file request
- adding non-compressed-ZIP-Option for downloading directories
- Upgrade Failure on Yunohost HOT 1
- Not working with php local server? HOT 2
- info page - cannot use passhash HOT 1
- PHP error if request is received with no user-agent header
- Show text under content menu if text file is named X (Like README.md here on github) HOT 4
- (Request) Add sketchfab's 3d-viewer support for 3D models HOT 1
- Skip root-directory in index listing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from h5ai.