Files
2026-06-17 15:42:16 +02:00

24 lines
751 B
ApacheConf

#
#Redirect project page
RewriteRule ^project/([\w-]+)/?$ project.php?uid=$1 [NC,L]
#
#Redirect projects tags
RewriteRule ^projects/([a-zA-Z]+)/?$ projects.php?tag=$1 [NC,L]
#Redirect projects pages
RewriteRule ^projects/(\d+)/?$ projects.php?page=$1 [NC,L]
#Redirect projects tags and pages
RewriteRule ^projects/([a-zA-Z]+)/(\d+)/?$ projects.php?tag=$1&page=$2 [NC,L]
#
#Redirect downloads
RewriteRule ^file/([\w-]+)/?$ file.php?uid=$1 [NC,L]
#
#Catch exceptions
RewriteRule ^project/?$ project.php [NC,L]
RewriteRule ^projects/?$ projects.php [NC,L]
RewriteRule ^projects/(\w+)/?$ projects.php [NC,L]
#
#Redirect files to .php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php