Rewrite-Rules not working on a vhost, everything goes to index.php

I’m not sure if this helps but its good practice, include the BEGIN and END WordPress comments around your rules as well as the check for mod_rewrite: # 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 Also: … Read more

Multisite without .htaccess

e.g. wpinstance.com/wp-admin is not rewritten into wp-admin/ with a trailing slash, but into ugly long link: https://wpinstance.com/wp-login.php?redirect_to=https%3A%2F%2Fwpinstance.com%2Fwp-admin%2F&reauth=1 As is already mentioned in comments, this is intentional. There is no “pretty” URL for this. And neither does there need to be – this should not be indexed or linked to. do I need .htaccess? No, you … Read more

root-relative links for multiple parked domains

I tracked the function calls in my theme (a child theme of Oenology by Chip Bennett) and wp-include that generate the links, found the home_url() function, and then wrote these functions for my site: function gregory_make_relative($url=””) { return preg_replace( ‘#^https?://[^/]+/#iu’, “https://wordpress.stackexchange.com/”, $url, 1 ); } add_filter( ‘home_url’, ‘gregory_make_relative’, 11, 1 ); I intentionally grep-searched to … Read more

Using separate Apache log files for multisite

You could set up custom logs in your httpd-vhosts.conf depending on the HTTP_HOST variable – if your server is an Apache and you use subdomains for each single site. For sub directories (not tested): SetEnvIf Request_URI ^sitename1 sitename1 SetEnvIf Request_URI ^sitename2 sitename2 CustomLog sitename1.log common env=sitename1 CustomLog sitename2.log common env=sitename2

WordPress multisite with domain mapping and virtual host on local with fake domain

DocumentRoot for each VirtualHost should point to the directory where you installed WP multisite. There is no actual directory for subsites, they’re all virtual. Using your example: <VirtualHost *:80> DocumentRoot “C:/home/wp-intall-directory” ServerName mysite-1.dev # not required Alias /mysite-1.dev “/home/mysite-1” <Directory “/home/wp-intall-directory”> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> … Read more