-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
34 lines (26 loc) · 1.42 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<IfModule mod_rewrite.c>
RewriteEngine On
# Account functions redirect
# Example: /login -> account.php?action=login
RewriteRule ^(login|logout|account|register)$ account.php?action=$1 [L]
# Admin functions redirect
# Example: /login -> account.php?action=login
RewriteRule ^admin$ admin.php [L]
# Milestone redirect
# Example: /products/1/milestones/2 -> milestone.php?product=1&milestone=2&extra=
RewriteRule ^products\/([^\/]+)\/milestones\/([^\/]+)(.*)$ milestone.php?product=$1&milestone=$2&extra=$3 [L]
# Project redirect
# Example: /products/1/projects/2 -> project.php?product=1&project=2&extra=
RewriteRule ^products\/([^\/]+)\/projects\/([^\/]+)(.*)$ project.php?product=$1&project=$2&extra=$3 [L]
# Main page redirect
# Example: /products/1/roadmap -> roadmap.php?product=1&extra=
RewriteRule ^products\/([^\/]+)\/(roadmap|milestones|projects|settings)\/?(.*)$ $2.php?product=$1&extra=$3 [L]
# Product redirect
# Example: /products/1 -> product.php?product=1&extra=
RewriteRule ^products\/([^\/]+)(.*)$ product.php?product=$1&extra=$2 [L]
# Product redirect (nickname)
# Example: /amo/milestones/2 -> products/amo/milestones/2 -> milestone.php?product=amo&milestone=2&extra=
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\/]+)\/?(.*)$ products/$1/$2
</IfModule>