1
votes

I've installed wordpress in multisite mode on my localhost. I am using WAMP server on windows 10.

The parent site works well and can be accessed. However when I try to go to the sub sites It says the URL was not found on the server. Both for the sites as well as their backends.

I have followed the network setup instructions as specified by wordpress.

I think it's an issue with mod_rewrite, how ever in my httpd.conf when I uncomment

#LoadModule rewrite_module modules/mod_rewrite.so

I get an internal server error

My htaccess file is

# BEGIN WordPress
<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase sandbox/mainsite/
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]
</IfModule>

# END WordPress

Another curious thing is that when I change the permalinks in wordpress to custom structure and hit save, it does not get saved and reverts to the previous setting.

Any Ideas?

1
You will need to enable mod_rewrite, the contents of your .htaccess file area being ignored because of the <IfModule mod_rewrite.c> check. - doublesharp
@doublesharp So I removed <IfModule mod_rewrite.c> from the .htaccess and enabled mod_rewrite and I get an internal server error. - Ronald Fernandes
You can leave the <IfModule> since it just checks if the extension is loaded before processing the rules inside it, so you just need to enable mod_rewrite. Check your error log to get the specifics, but perhaps you don't have mod_write? - doublesharp
I have enabled mod_rewrite by uncommenting the line #LoadModule rewrite_module modules/mod_rewrite.so . I still get an internal server error when I enable it. Thats whats confusing me. - Ronald Fernandes
[Thu Sep 03 12:17:07.506490 2015] [core:alert] [pid 36540:tid 1096] [client ::1:55389] E:/websites/sandbox/mainsite/.htaccess: RewriteBase: argument is not a valid URL This is the error from the log - Ronald Fernandes

1 Answers

0
votes

Ok Fixed the Issue. The problem was the Rewrite Base was not reading the correct URL.

Adding a '/' before it worked. So I changed

RewriteBase sandbox/mainsite/

to

RewriteBase /sandbox/mainsite/