Multisite – add www on site URL
-
Hi guys, I need some help.
I have a wordpress site installed on https://www.domain.com/info/wp that was already installed by someone else.
However, instead of accessing the site on https://www.domain.com/info/wp, the site URL will be pointed to https://www.domain.com/info/. To do this, there were 2 htaccess files – one is located on /info and the other one is on /wp.There’s also an index.php file under /info that contains these codes:
<?php /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require('./wp/wp-blog-header.php'); ?>
I tried to set up a Multisite after with these settings and added some lines on the config.php file and the two htaccess files. Everything works fine except that the site that I created under multisite looks like this:
https://domain.com/info/site2and I want to change it to:
https://www.domain.com/info/site2I know it’s possible to do it via htaccess but I don’t know how.
Additional info
Here’s what the htaccess on /info folder looks like:# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /info/ 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).*) wp/$2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L] RewriteRule . /info/index.php [L] </IfModule> # END WordPress
And the htaccess of /info/wp:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /info/wp/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /info/wp/index.php [L] </IfModule> # END WordPress
Any help will be much appreciated.
- The topic ‘Multisite – add www on site URL’ is closed to new replies.