I assume your preferred hostname is www.example.com
(www.root.nl
) – this needs to be consistent for both sites. (Currently your Wolf CMS seems to be favouring, whilst your WordPress directives are redirecting to example.com
(no www
).
This also assumes all your URLs are prefixed with a 4 digit year. ie.:
/2003
to/2012
– static site/2013
to/2018
– Wolf CMS/2019
onwards – WordPress
Try the following instead, in the .htaccess
file in the document root (public_html
directory) and remove the .htaccess
file in the /wordpress
subdirectory:
#Setting Wolf CMS requirements
#On some server configurations you may need to comment out one or more of
#the three lines below due to server limitations.
php_flag magic_quotes_gpc off
AddDefaultCharset UTF-8
Options -Indexes +FollowSymLinks
# Setting rewrite rules
RewriteEngine On
# Set next line to your Wolf CMS root - if not in subdir, then just /
# NB: You can only set the RewriteBase once in any one .htaccess file
RewriteBase /
# Canonical redirect
RewriteCond %{http_host} !^www\.example\.com$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
# Prevent further processing if request maps to an actual file
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^ - [L]
# Rules to allow install sequence to test for mod_rewrite support
# >>> ARE THESE STILL REQUIRED?
#RewriteRule ^wolf/install/index.html$ wolf/install/index.php?rewrite=1 [L,QSA]
#RewriteRule ^wolf/install/index.php$ wolf/install/index.php?rewrite=1 [L,QSA]
#RewriteRule ^wolf/install/$ wolf/install/index.php?rewrite=1 [L,QSA]
# Wolf CMS front controller
# Years 2013-2018 only - checks for this in the URL before rewriting
RewriteRule ^(201[345678]/.*) index.php?WOLFPAGE=$1 [L,QSA]
#
# When the request does not match above its falls through to WordPress...
#
RewriteRule ^wordpress/index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . /wordpress/index.php [L]