Skip to content

Instantly share code, notes, and snippets.

@edheltzel
Last active November 25, 2015 17:38
Show Gist options
  • Save edheltzel/f4f320c1ad0d4a95db3f to your computer and use it in GitHub Desktop.
Save edheltzel/f4f320c1ad0d4a95db3f to your computer and use it in GitHub Desktop.
Basic .htaccess file for postname permalinksApache rewrite module must be enabled -- mainly used for YeoPress
# Basic .htaccess file for postname permalinks
# Apache rewrite module must be enabled
# Rewrites / Permalinks
# =====================
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# ReWrite wp-admin
# ================
<IfModule mod_rewrite.c>
RewriteRule ^admin/(.*)$ wordpress/wp-admin/$1 [R=301,NC,L]
</IfModule>
# WordPress security
# ==================
<files .htaccess>
order allow,deny
deny from all
</files>
<files wp-config.php>
order allow,deny
deny from all
</files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment