This commit is contained in:
2024-07-20 19:23:43 +02:00
parent d608a990b6
commit 3fa2f07ed3
14 changed files with 526 additions and 47 deletions
+8 -13
View File
@@ -12,24 +12,19 @@ RewriteBase /phpCourse/exam
RewriteRule ^phpCourse/exam/config/.* index.php [L,NC]
RewriteRule ^phpCourse/exam/vendor/.* index.php [L,NC]
RewriteRule ^phpCourse/exam/routes/.* index.php [L,NC]
RewriteRule ^phpCourse/exam/react/.* index.php [L,NC]
##
## White listed folders
## API routes
##
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} !/api/docs/.*
RewriteCond %{REQUEST_FILENAME} !/pages/.*
RewriteRule !^index.php index.php [L,NC]
##
## Block all PHP files, except index
##
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} \.php$
RewriteRule !^index.php index.php [L,NC]
RewriteCond %{REQUEST_FILENAME} /api/.*
RewriteCond %{REQUEST_FILENAME} !/api/docs
RewriteRule ^ api/index.php [L,NC,QSA]
##
## Standard routes
##
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteCond %{REQUEST_FILENAME} !/api/docs
RewriteCond %{REQUEST_FILENAME} !/dist
RewriteRule ^ dist [L,NC,QSA]