Simple Route
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
RewriteEngine On
|
||||
|
||||
##
|
||||
## You may need to uncomment the following line for some hosting environments,
|
||||
## if you have installed to a subdirectory, enter the name here also.
|
||||
##
|
||||
RewriteBase /phpCourse/exam
|
||||
|
||||
##
|
||||
## Black listed folders
|
||||
##
|
||||
RewriteRule ^phpCourse/exam/app/.* index.php [L,NC]
|
||||
RewriteRule ^phpCourse/exam/config/.* index.php [L,NC]
|
||||
RewriteRule ^phpCourse/exam/vendor/.* index.php [L,NC]
|
||||
RewriteRule ^phpCourse/exam/routes/.* index.php [L,NC]
|
||||
|
||||
##
|
||||
## White listed folders
|
||||
##
|
||||
RewriteCond %{REQUEST_FILENAME} -f
|
||||
RewriteCond %{REQUEST_FILENAME} !/api/docs/.*
|
||||
RewriteCond %{REQUEST_FILENAME} !/pages/.*
|
||||
RewriteCond %{REQUEST_FILENAME} !/pages/assets/.*
|
||||
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]
|
||||
|
||||
##
|
||||
## Standard routes
|
||||
##
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
Reference in New Issue
Block a user