-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
17 lines (13 loc) · 893 Bytes
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
RewriteEngine on
RewriteRule ^category/([0-9]+)/?$ /public/index.php?id=$1 [NC,L] # Handle category requests
RewriteRule ^product/([0-9]+)/?$ /public/index.php?id=$1 [NC,L] # Handle product requests
RewriteRule ^review/([0-9]+)/?$ /public/index.php?id=$1 [NC,L] # Handle review requests
RewriteRule ^login/([0-9]+)/?$ /public/index.php?id=$1 [NC,L] # Handle login requests
RewriteRule ^logout/([0-9]+)/?$ /public/index.php?id=$1 [NC,L] # Handle logout requests
RewriteRule ^admin/([0-9]+)/?$ /public/index.php?id=$1 [NC,L] # Handle admin requests
# Rewrite all the default paths to public e.g. /css/style.css -> /public/css/style.css
RewriteCond %{REQUEST_URI} !/public
RewriteRule ^(.*)$ public/$1 [L]
# Rewrite all the files to index.php /random -> /public/index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /public/index.php [NC,L,QSA]