Last active
March 14, 2021 13:28
-
-
Save primitiveshaun/5c3eb6307f4b85901612eb2fb6c956ef to your computer and use it in GitHub Desktop.
Apache - .htaccess Reference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# htaccess-rules.sh | |
# *** HOUSEKEEPING! Now that's how an Apache handles config... *** | |
# Master File: Maintained by Primitive Digital's Housekeeping Department | |
# https://primitivedigital.uk/housekeeping-department/ | |
# STATUS ::: DRAFT: Requires Review | |
# N.B. You only need "RewriteEngine On" once in the .htaccess, before any RewriteCond and RewriteRule lines. | |
# N.B. If rules are duplicated the one that appears last has dominance. | |
# WordPress | |
# https://wordpress.org/support/article/htaccess/ | |
# enable mod_rewrite | |
# https://httpd.apache.org/docs/current/mod/mod_rewrite.html | |
RewriteEngine On | |
# add a trailing slash to /wp-admin | |
# needs review | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
# .htaccess Fix for Infinite Loops | |
# needs review | |
RewriteBase / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment