Skip to content

Commit b4180d8

Browse files
authored
Update index.php
1 parent bd180bd commit b4180d8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

public/index.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,16 @@ function cleanArray($didYouMeans){
132132
if('/' !== $uri){
133133
foreach($moduleDirs as $moduleDir){
134134
$file = $moduleDir . str_replace('/', \DIRECTORY_SEPARATOR, $uri);
135-
if(file_exists($file)){
135+
136+
if(!file_exists($file) && file_exists($file.'.php') ){
137+
$file = $file.'.php';
138+
}
139+
140+
if((!file_exists($file) || ( file_exists($file) && is_dir($file) )) && file_exists($file.\DIRECTORY_SEPARATOR.'index.php') ){
141+
$file = $file.\DIRECTORY_SEPARATOR.'index.php';
142+
}
143+
144+
if(file_exists($file) && !is_dir($file) ){
136145

137146
$outPut = file_get_contents($file);
138147

0 commit comments

Comments
 (0)