-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.htaccess
32 lines (24 loc) · 1.32 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
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
# Disable Directory Browsing
Options -MultiViews -Indexes
</IfModule>
Options +FollowSymLinks
RewriteEngine On
## Uncomment "#RewriteBase /" below (remove "#") if the website is installed in a folder, and then add the folder name after the slash "/"
## Example: If it is installed in "/public_html/kikder/", then it should be "RewriteBase /kikder/", however it can depends of your Apache configuration.
## If you need, please ask your hosting company or check the Apache doc: http://httpd.apache.org/docs/current/mod/mod_rewrite.html
#RewriteBase /
# Remove www subdomain in the URL
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# Force the URL to be https (only if you have an SSL certificate)
# RewriteCond %{SERVER_PORT} 80
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# NOTE: These rules have to come before we rewrite all uri requests. Else, it won't work
RewriteRule ^s/([a-z0-9\.\-_]+)$ index.php?uri=stripe&hash=$1 [QSA,L]
RewriteRule ^p/([a-z0-9\.\-_]+)$ index.php?uri=paypal&hash=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?uri=$1 [QSA,L]
</IfModule>