api
This commit is contained in:
28
api/.htaccess
Normal file
28
api/.htaccess
Normal file
@@ -0,0 +1,28 @@
|
||||
RewriteEngine On
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# 1) Direkter Aufruf von PHP-Dateien verhindern und auf index.php routen
|
||||
# Beispiel:
|
||||
# /v1/browser.quick.test.php -> /index.php (mit REQUEST_URI erhalten)
|
||||
# --------------------------------------------------------------
|
||||
RewriteCond %{REQUEST_URI} !/index\.php$
|
||||
RewriteRule ^(.+)\.php$ /index.php [QSA,L]
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# 2) Echte Dateien (JSON, JS, CSS, Bilder etc.) normal ausliefern
|
||||
# --------------------------------------------------------------
|
||||
RewriteCond %{REQUEST_FILENAME} -f
|
||||
RewriteRule ^ - [L]
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# 3) Echte Verzeichnisse normal ausliefern
|
||||
# --------------------------------------------------------------
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^ - [L]
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# 4) Alles andere durch index.php routen
|
||||
# Beispiel:
|
||||
# /v1/quickcheck -> index.php
|
||||
# --------------------------------------------------------------
|
||||
RewriteRule ^ /index.php [QSA,L]
|
||||
Reference in New Issue
Block a user