pmd/website/.htaccess

18 lines
707 B
ApacheConf
Raw Normal View History

Options Indexes FollowSymLinks
ErrorDocument 404 /error404.html
RewriteEngine On
# rewrite any request to a unknown file to pmd-X.Y.Z
# (or whatever subfolder the first rule will set to the environment variable PMD)
# but redirect only if the file exists there
2013-02-03 19:19:58 +01:00
RewriteRule .* - [E=PMD:pmd-5.0.2]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond /home/project-web/pmd/htdocs/%{ENV:PMD}%{REQUEST_URI} -f
RewriteRule .* /%{ENV:PMD}%{REQUEST_URI} [L,R]
# rewrite any remaining request to pmd-4.3.0 for backwards compatibility
# as the old versions link to a non-versioned rule description URLs.
RewriteCond /home/project-web/pmd/htdocs/pmd-4.3.0%{REQUEST_URI} -f
RewriteRule .* /pmd-4.3.0%{REQUEST_URI} [L,R]