mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-23 03:12:14 +00:00
Moved .htaccess & added rules.
- deny all requests for server side only files - allow only the index.php in src/
This commit is contained in:
parent
19ad5c54ee
commit
fb3249fa74
36
.htaccess
Normal file
36
.htaccess
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Apache version required 2.x
|
||||||
|
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -f
|
||||||
|
|
||||||
|
RewriteRule ^(.*)$ src/index.php [L]
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
|
||||||
|
# RedirectMatch 403 ^/vendor/*$
|
||||||
|
ErrorDocument 403 /src/index.php
|
||||||
|
|
||||||
|
|
||||||
|
<FilesMatch ".*\.(php|html|twig|json)$">
|
||||||
|
<IfVersion < 2.4>
|
||||||
|
Order Allow,Deny
|
||||||
|
Deny from all
|
||||||
|
</IfVersion>
|
||||||
|
<IfVersion >= 2.4>
|
||||||
|
Require all denied
|
||||||
|
</IfVersion>
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# on donne l'autorisation d'acceder au fichier handler.php (sinon le site ne sera pas foncitonnel)
|
||||||
|
<FilesMatch "^index.php">
|
||||||
|
<IfVersion < 2.4>
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</IfVersion>
|
||||||
|
<IfVersion >= 2.4>
|
||||||
|
Require all granted
|
||||||
|
</IfVersion>
|
||||||
|
</FilesMatch>
|
@ -1,4 +0,0 @@
|
|||||||
RewriteEngine on
|
|
||||||
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteRule ^(.*)$ ./index.php [L,QSA]
|
|
Loading…
x
Reference in New Issue
Block a user