WordPress in a Sub-Folder

Follow these steps when placing WordPress in a subfolder.

Parent .htaccess file content:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^katherinegoodmanson.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www.katherinegoodmanson.ca$
RewriteCond %{REQUEST_URI} !^/kg/
RewriteRule (.*) /kg/$1

Sub-folder .htaccess file content:

# 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]

# END WordPress

Leave a Reply

katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.