Refactor code structure for improved readability and maintainability

This commit is contained in:
2026-02-21 21:48:03 +01:00
parent ebab220f7e
commit 5eee2c6649
21 changed files with 172 additions and 150 deletions

View File

@@ -1,7 +1,3 @@
# <FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
# SetHandler application/x-lsphp83 /opt/alt/php83 usr/bin/lsphp
# </FilesMatch>
RewriteEngine On
RewriteBase /
Options +FollowSymlinks
@@ -13,6 +9,7 @@ RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
# Przekierowanie z http na https, jeśli nie zawiera www
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/(tpay-status|platnosc-status|przelewy24-status)$ [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Usuwanie końcowego slash'a dla niekatalogów
@@ -21,11 +18,9 @@ RewriteCond %{REQUEST_URI} !^/admin/.*$ [NC] # Wyklucza ścieżki rozpoczynając
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [R=301,L]
ErrorDocument 404 /index.php
RewriteCond %{REQUEST_URI} !^(.*)/libraries/(.*) [NC]
RewriteCond %{REQUEST_URI} !^(.*)/layout/(.*) [NC]
RewriteRule ^admin/([^/]*)/([^/]*)/(.*)$ admin/index.php?module=$1&action=$2&$3 [QSA,L]
RewriteRule ^admin/([^/]*)/([^/]*)/(.*)$ admin/index.php?module=$1&action=$2&$3 [L]
RewriteRule ^admin/$ admin/index.php [L]
@@ -33,9 +28,9 @@ RewriteRule ^wyszukiwarka/(.*)/([0-9]*)$ index.php?module=search&action=search_r
RewriteRule ^wyszukiwarka/(.*)$ index.php?module=search&action=search_results&query=$1&bs=1 [L]
RewriteRule ^zamowienie/([a-zA-Z0-9-]*)$ index.php?module=shop_order&action=order_details&order_hash=$1 [L]
RewriteRule ^potwierdzenie-platnosci/([a-zA-Z0-9-]*)$ index.php?module=shop_order&action=payment_confirmation&order_hash=$1 [L]
RewriteRule ^tpay-status$ index.php?module=shop_order&action=payment_status_tpay%{QUERY_STRING} [L]
RewriteRule ^platnosc-status$ index.php?module=shop_order&action=payment_status_hotpay%{QUERY_STRING} [L]
RewriteRule ^przelewy24-status$ index.php?module=shop_order&action=payment_status_przelewy24pl%{QUERY_STRING} [L]
RewriteRule ^tpay-status$ index.php?module=shop_order&action=payment_status_tpay [QSA,L]
RewriteRule ^platnosc-status$ index.php?module=shop_order&action=payment_status_hotpay [QSA,L]
RewriteRule ^przelewy24-status$ index.php?module=shop_order&action=payment_status_przelewy24pl [QSA,L]
RewriteRule ^koszyk$ index.php?module=shop_basket&action=main_view [L]
RewriteRule ^koszyk-podsumowanie$ index.php?module=shop_basket&action=summary_view [L]
RewriteRule ^zloz-zamowienie$ index.php?module=shop_basket&action=basket_save [L]