Skip to content

Instantly share code, notes, and snippets.

View Ottergoose's full-sized avatar

Nick Benson Ottergoose

View GitHub Profile
@Ottergoose
Ottergoose / dynamic-rewrite-base
Last active October 30, 2019 18:51
These .htaccess rules will remove index.php from your ExpressionEngine URLs and preserve query strings, which are used by things like Google Analytics. The first file is what we use to dynamically change the rewrite base in dev/staging/production. If you're not interested in doing that, I believe you can remove the "%{ENV:REWRITEBASE}" from the …
# ---------------------------------------------------------------------
# Enable Rewrite Engine
# ---------------------------------------------------------------------
RewriteEngine on
# ----------------------------------------------------------------------
# Dynamic Base Path - Dev - localhost
# ----------------------------------------------------------------------