I have a wordpress multisite installation using wordpress subfolders and a laravel app side by side in the /var/www directory

The wordrpress installation is called wordpress and the laravel installation laravel

I want wordpress to control all sites except from mydomain/data which should point to my laravel installation

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName  xxxxx.xxxxxxx.xxx
        DocumentRoot /var/www/wordpress
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /var/www/wordpress>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
             ErrorLog ${APACHE_LOG_DIR}/error.log
          LogLevel warn
              CustomLog ${APACHE_LOG_DIR}/access.log combined
                Alias /doc/ "/usr/share/doc/"
                <Directory "/usr/share/doc/">
                         Options Indexes MultiViews FollowSymLinks
                         AllowOverride None
                         Order deny,allow
                         Deny from all
                </Directory>
</VirtualHost>
<VirtualHost *:80>
        DocumentRoot /var/www/laravel/public
        ServerName xxxxx.xxxxxxx.xxx/data
        <Directory "/var/www/laravel/public">
                    Options Indexes MultiViews FollowSymLinks
              AllowOverride All
              Order deny,allow
              Allow from all
        </Directory>
</Virtualhost>

My wordpress .htaccess is as follows

RewriteEngine On
RewriteBase /
#custom edits beginning
RewriteCond %{REQUEST_URI} !^data..*$ [NC]
RewriteRule .*/data ../laravel/public/index.php [L]
#custom edits end
RewriteRule ^index.php$ - [L]
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]

Read more here: How to use laravel and wordpress multisite in the same domain


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , ,

Wordpress related questions and answers: