Use nice URIs and set up redirects for the old ones

This commit is contained in:
2022-01-13 02:47:31 +01:00
parent 0804e64121
commit 91acce61ef
4 changed files with 28 additions and 17 deletions

View File

@@ -1,3 +1,14 @@
ErrorDocument 404 /main.php?page=404
DirectoryIndex maincg.php main.php index.php start.html index.html
Options -Indexes
RewriteEngine on
RewriteCond &%{QUERY_STRING} &page=([^&]+) [NC]
RewriteRule ^(maincg\.php)?$ %1.html [R=301,QSD,L]
RewriteRule pages/(.*)\.php $1.html [R=301,L]
RewriteRule ^cyklogaining.html$ / [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(pdf|js|ico|gif|jpg|jpeg|png|webp|svg|css|rar|zip|7z|tar\.gz|map|eot|ttf|otf|woff|woff2)$ index.php [L]
Options -Indexes