

## No directory listings
<IfModule autoindex>
  IndexIgnore *
</IfModule>

## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes

## Mod_rewrite in use.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed 
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on CMS
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

## Dec 2021 updates

Redirect 301 /team-experiences https://www.leadershipcollaboratory.com/

## Dec 2020 updates

Redirect 301 /ready-made-learning /team-experiences
Redirect 301 /one-to-one-coaching /coaching

## Late 2018 site redesign

Redirect 301 /solutions/programs /team-experiences
Redirect 301 /solutions/design /tailor-made-leadership
Redirect 301 /solutions/coaching /coaching
Redirect 301 /solutions /tailor-made-leadership
Redirect 301 /clients /about
Redirect 301 /designs/achieve /tailor-made-leadership
Redirect 301 /designs/align /tailor-made-leadership
Redirect 301 /designs/engage /tailor-made-leadership
Redirect 301 /expert-blog/37-solve-and-learn /
Redirect 301 /expert-blog/36-experience-and-dive-in /
Redirect 301 /expert-blog/35-disrupt-and-create /
Redirect 301 /expert-blog/34-begin-with-discovery /
Redirect 301 /expert-blog /
Redirect 301 /contact-info /contact
Redirect 301 /program/change-systems /team-experiences
Redirect 301 /program/community-leadership /coaching
Redirect 301 /program/communication-strengths /coaching
Redirect 301 /program/vision-strategy /coaching
Redirect 301 /program/self-development /coaching


## End - Custom redirects

##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your CMS Directory (just / for root).
##

# RewriteBase /

## Begin - CMS core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - CMS core SEF Section.

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
