Files
kobcrane-montaze.pl/.htaccess
Jacek Pyziak c9ed7b5d5d Add author management functionality and update routing rules
- Updated .htaccess rules to allow trailing slashes for specific routes.
- Introduced a new .gitignore file to exclude the cache directory.
- Created project configuration file for Serena with language and tool settings.
- Implemented Authors class for managing author data, including methods for saving, deleting, and editing authors.
- Added factory class for Authors to handle database interactions related to authors.
- Developed Article class to manage article data and interactions, including fetching articles and updating views.
- Created Page class with a placeholder method for sorting pages.
- Added front factory class for fetching author details with caching.
2026-02-27 11:28:56 +01:00

174 lines
7.9 KiB
ApacheConf

RewriteEngine On
RewriteBase /
Options +FollowSymlinks
Options -Indexes
RewriteCond %{REQUEST_METHOD} ^(GET|HEAD)$
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_METHOD} ^(GET|HEAD)$
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_METHOD} ^(GET|HEAD)$
RewriteCond %{REQUEST_URI} !^/admin(/|$) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.+)$ https://%{HTTP_HOST}/$1/ [L,R=301]
ErrorDocument 404 /404.html
RewriteCond %{REQUEST_URI} !^(.*)/libraries/(.*) [NC]
RewriteCond %{REQUEST_URI} !^(.*)/css/(.*) [NC]
RewriteRule ^admin/([^/]*)/([^/]*)/(.*)$ admin/index.php?module=$1&action=$2&$3 [L]
RewriteRule ^admin/$ admin/index.php [L]
RewriteRule ^wyszukiwarka(|/)$ index.php?search=true&lang=pl [L]
RewriteRule ^wersja-tymczasowa(|/)$ index.php?devel=true&lang=pl [L]
RewriteRule ^pixieset/(.*)$ index.php?module=articles&action=image&hash=$1 [L]
RewriteRule ^pixieset-wszystkie/(.*)$ index.php?module=articles&action=images_download&hash=$1 [L]
RewriteRule ^audyt-seo/wynik(|/)$ index.php?module=auditSEO&action=main_view&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_URI} ^/auditSEO/(.*) [NC]
RewriteRule ^([^/]*)/([^/]*)/(.*)$ index.php?module=$1&action=$2&$3 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.php
RewriteRule ^ /%1 [R=301,L]
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType image/x-icon "access plus 1 week"
ExpiresByType text/x-component "access plus 1 year"
ExpiresByType text/html "access plus 0 seconds"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"
ExpiresByType audio/ogg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType video/ogg "access plus 1 year"
ExpiresByType video/webm "access plus 1 year"
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
</IfModule>
<Files *.conf>
Order Deny,Allow
Deny from all
</Files>
<Files *.log>
Order Deny,Allow
Deny from all
</Files>
<Files *.ini>
Order Deny,Allow
Deny from all
</Files>
RewriteRule ^pl/$ index.php?a=change_language&id=pl [L]
RewriteRule ^$ index.php?a=page&id=1&lang=pl&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_URI} ^/home(|/)$
RewriteRule ^(.*)$ https://kobcrane-montaze.pl/ [R=301,L]
RewriteCond %{REQUEST_URI} ^/home/s/1$
RewriteRule ^(.*)$ https://kobcrane-montaze.pl/ [R=301,L]
RewriteCond %{REQUEST_URI} "^/$"
RewriteRule ^$ index.php?a=page&id=1&lang=pl [L]
RewriteRule ^home(|/)$ index.php?a=page&id=1&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^home/s/1(|/)$ home [R=301,L]
RewriteRule ^home/s/([0-9]+)(|/)$ index.php?a=page&id=1&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^produkty(|/)$ index.php?a=page&id=8&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^produkty/s/1(|/)$ produkty [R=301,L]
RewriteRule ^produkty/s/([0-9]+)(|/)$ index.php?a=page&id=8&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^aktualnoci(|/)$ index.php?a=page&id=2&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^aktualnoci/s/1(|/)$ aktualnoci [R=301,L]
RewriteRule ^aktualnoci/s/([0-9]+)(|/)$ index.php?a=page&id=2&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^o-firmie(|/)$ index.php?a=page&id=3&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^o-firmie/s/1(|/)$ o-firmie [R=301,L]
RewriteRule ^o-firmie/s/([0-9]+)(|/)$ index.php?a=page&id=3&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^nasi-partnerzy(|/)$ index.php?a=page&id=4&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^nasi-partnerzy/s/1(|/)$ nasi-partnerzy [R=301,L]
RewriteRule ^nasi-partnerzy/s/([0-9]+)(|/)$ index.php?a=page&id=4&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^do-pobrania(|/)$ index.php?a=page&id=5&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^do-pobrania/s/1(|/)$ do-pobrania [R=301,L]
RewriteRule ^do-pobrania/s/([0-9]+)(|/)$ index.php?a=page&id=5&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^ochrona-danych(|/)$ index.php?a=page&id=6&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^ochrona-danych/s/1(|/)$ ochrona-danych [R=301,L]
RewriteRule ^ochrona-danych/s/([0-9]+)(|/)$ index.php?a=page&id=6&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^kontakt(|/)$ index.php?a=page&id=7&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^kontakt/s/1(|/)$ kontakt [R=301,L]
RewriteRule ^kontakt/s/([0-9]+)(|/)$ index.php?a=page&id=7&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^serwis-i-naprawa-podestow-ruchomych(|/)$ index.php?a=page&id=9&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^serwis-i-naprawa-podestow-ruchomych/s/1(|/)$ serwis-i-naprawa-podestow-ruchomych [R=301,L]
RewriteRule ^serwis-i-naprawa-podestow-ruchomych/s/([0-9]+)(|/)$ index.php?a=page&id=9&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^czesci(|/)$ index.php?a=page&id=10&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^czesci/s/1(|/)$ czesci [R=301,L]
RewriteRule ^czesci/s/([0-9]+)(|/)$ index.php?a=page&id=10&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^akcesoria(|/)$ index.php?a=page&id=11&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^akcesoria/s/1(|/)$ akcesoria [R=301,L]
RewriteRule ^akcesoria/s/([0-9]+)(|/)$ index.php?a=page&id=11&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^nowe-w-magazynie(|/)$ index.php?a=page&id=12&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^nowe-w-magazynie/s/1(|/)$ nowe-w-magazynie [R=301,L]
RewriteRule ^nowe-w-magazynie/s/([0-9]+)(|/)$ index.php?a=page&id=12&lang=pl&bs=$1&%{QUERY_STRING} [L]
RewriteRule ^teleskopowe/cte(|/)$ index.php?article=1&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^a-3-ochrona-danych(|/)$ index.php?article=3&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^teleskopowe/france-elevateur(|/)$ index.php?article=4&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^przegubowo-teleskopowe/cte(|/)$ index.php?article=5&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^przegubowo-teleskopowe/france-elevateur(|/)$ index.php?article=6&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^na-podwoziu-typu-furgon/france-elevateur(|/)$ index.php?article=7&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^na-podwozu-gasienicowym/cte(|/)$ index.php?article=8&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^szynowo-drogowe/france-elevateur(|/)$ index.php?article=9&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^izolowane-do-750-kv/france-elevateur(|/)$ index.php?article=10&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^multipurpose/producent-cte(|/)$ index.php?article=11&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^pianoplan/producent-cte(|/)$ index.php?article=12&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^a-14-o-firmie(|/)$ index.php?article=14&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^a-15-nasi-partnerzy(|/)$ index.php?article=15&lang=pl&%{QUERY_STRING} [L]
RewriteRule ^oferty-pracy(|/)$ index.php?module=globelusAdverts&action=adverts_list&cp=1&%{QUERY_STRING} [L]
RewriteRule ^newsletter/signin$ index.php?module=newsletter&action=signin [L]
RewriteRule ^newsletter/confirm/hash=(.*)$ index.php?module=newsletter&action=confirm&hash=$1 [L]
RewriteRule ^newsletter/unsubscribe/hash=(.*)$ index.php?module=newsletter&action=unsubscribe&hash=$1 [L]