Błąd 403
Jeśli pojawił się komunikat: 403 Forbidden Access to this resource on the server is denied!
to należy w pliku .htaccess odnaleźć fragment:
# For security reasons, deny access to other PHP files on public sites. # Note: The following URI conditions are not anchored at the start (^), # because Drupal may be located in a subdirectory. To further improve # security, you can replace '!/' with '!^/'. # Allow access to PHP files in /core (like authorize.php or install.php): RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$ # Allow access to test-specific PHP files: RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?\.php # Allow access to Statistics module's custom front controller. # Copy and adapt this rule to directly execute PHP files in contributed or # custom modules or to run another PHP application in the same directory. RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics\.php$ # Deny access to any other PHP files that do not match the rules above. # Specifically, disallow autoload.php from being served directly. RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F]
i przed linią: # Deny access to any other PHP files that do not match the rules above. dodać odpowiednią lokalizację pliku.
Przykład: RewriteCond %{REQUEST_URI} !/folder/nazwa_pliku\.php$
Kategoria