shimizust/trackyourclimb/master/.htaccess - Htaccess File


# Start A2 Switcher Block
# Do not remove or modify this block! Added by PHP Switcher from cPanel to use an alternate PHP version. Contact Support for details.
<IfModule mod_suphp.c>
  AddHandler application/x-httpd-php-5.5.0 .php
# End A2 Switcher Block

# Prevent Apache from serving .ht* files:
<FilesMatch "^.ht">
Order allow,deny
Deny from all

# Don't allow access to .ini files
<files *.ini>
order allow,deny
deny from all

#redirect to php api controller
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$1 [R=301,L] 

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#These rules say that if the requested URI does not match an existing file or directory name (ex., then try the following rewrite rule.

RewriteRule api/v1/(.*)$ api/v1/api.php?request=$1 [QSA,NC,L]
#This rule ([^.]+) can be broken down as such: '^' means 'not', . is an escaped period, and '+' matches 1 or more characters. So this matches all the characters that don't include a period character. 

#match URI and redirect (ex. should redirect to
#the flag [QSA] means that the named capture will be appended to the newly created URI
#the flag [NC] means that the URIs are not case-sensitive
#the flag [L] means that the mod_rewrite should not provide any additional rules if this rule matches


On Github License


Download PDF of Htaccess file