title: Wordpress Multisite Permalinks Not Saving
body: <p>The permalinks for some of the network sites will reset to the url of the main site. </p>
  
  <p>Example:
  <code>example.com/site1</code> will occasionally reset to <code>example.com</code></p>
  
  <p>This started happening after installing an SSL on the server.</p>
  
  <p>In the apache sites-enabled config file I have a SSL VirtualHost</p>
  
  <pre><code>#SSL VirtualHost
  &lt;VirtualHost *:443&gt;
  ServerName www.example.com
  
  DocumentRoot /var/www/html
  
      &lt;Directory /var/www/html/&gt;
          DirectoryIndex index.php
          Options Indexes FollowSymLinks
  
          AllowOverride All
          Order allow,deny
          Allow from all
      &lt;/Directory&gt;
  
  SSLEngine ON
  SSLCertificateFile /etc/httpd/conf/example.crt
  SSLCertificateKeyFile /etc/httpd/conf/example.key
  SSLCertificateChainFile /etc/httpd/conf/example.crt
  
  ErrorLog logs/ssl.domain.com.error_log
  CustomLog logs/ssl.domain.com.access_log combined
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>and my <code>.htaccess</code> looks like this</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteCond %{HTTP_HOST} !^www\.
  RewriteRule ^(.*)$ https://www.%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
  
  RewriteCond %{HTTPS} off
  RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
  
  &lt;/IfModule&gt;
  
  
  
  # BEGIN WordPress
  
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  # uploaded files
  Options +FollowSymlinks
  RewriteRule ^([_0-9a-zA-Z-]+/)?files(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
  RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
  RewriteRule . index.php [L]
  
  # END WordPress
  </code></pre>