diff --git a/.htaccess b/.htaccess index 8854559..5eca4e1 100644 --- a/.htaccess +++ b/.htaccess @@ -1,11 +1,19 @@ RewriteEngine On -RewriteCond %{THE_REQUEST} \ /(.+)\.php + +# top level php requests are converted to their html counterpart for backward compatability +RewriteCond %{THE_REQUEST} /(.+)\.php RewriteRule ^ /%1.html [L,R=301] -Redirect /plugins.html https://docs.kde.org/stable4/en/extragear-office/kmymoney/details.settings.plugins.html -Redirect /support.php /support/ -Redirect /documentation.php /support/documentation.html -Redirect /faq.php /support/faq.html -Redirect /recovery.php /support/recovery.html -Redirect /release-notes.php /changelog.html +# in case request is for a directory, open the index.html +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^(.+)/$ $1/index.html [NC,L] + +# if the file does not exist, append .html +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^([^\.]+)$ $1.html [NC,L] + +# Plugin information is taken from the KMyMoney 5.x online documentation +Redirect /plugins.html https://docs.kde.org/stable5/en/extragear-office/kmymoney/details.settings.plugins.html +# this is the second step in converting release-notes.php -> changelog.html +Redirect /release-notes.html /changelog.html