Sub Directory setup redirects to multisite root if not www
-
I recently setup a multisite to showcase my WP theme designs. The problem is accessing these sites without using www. in the url.
Multisite setup in “demos” folder
https://www.templateexpress.com/demosexample of one of the sites
https://www.templateexpress.com/demos/premierWorks fine if you visit the above link but if you visit:
https://templateexpress.com/demos/premier
I’m bounced to
https://www.templateexpress.com/demosI know I need to add some redirect code to my .htaccess file but Im not sure what code excatly and what .htaccess file.
Is it the https://www.templateexpress.com .htaccess file or https://www.templateexpress.com/demos .htaccess file I need to edit?
And what code do I need to add
This is taken from my “demos” .htaccess file:
RewriteEngine On RewriteBase /demos/ RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]
Thanks for taking the time to look at this.
Steven
- The topic ‘Sub Directory setup redirects to multisite root if not www’ is closed to new replies.