Successfully install second CMS in subdirectory now i'm having issue with Rewrite in .htaccess

Domain www.mymaindomain(.)com running CMS-1 and now I want to run 2nd CMS inside a subdirectory eg. www.mymaindomain(.)com/extra

I created a directory called " extra " and upload my CMS2 into that directory and used the same database to install the CMS.

So far everything works perfectly, however, when I try to visit my 2nd CMS by calling the URL www.mymaindomain(.)com/extra/admin/ the website redirects me back to my main domain www.mymaindomain(.)com .

I believe this has something to do with my .htaccess file inside my 2nd CMS

This is my .htaccess file inside www.mymaindomain(.)com/extra/

RewriteEngine On
#
 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
 
RewriteRule ^admin$ access.php [NC,QSA]
RewriteRule ^admin/(.*)$ access.php?page=$1 [NC,QSA]
RewriteRule ^admin/(.*)$ admin-panel/$1 [L]
 
RewriteRule ^$ index.php?url=home [NC,QSA]
 #--RewriteRule ^([^\/]+)(\/|)$ index.php?url=$1 [QSA]
RewriteRule ^404$ index.php?url=404 [L,QSA]
RewriteRule ^s/([^\/]+)(\/|)?$ index.php?url=share&share=$1 [L,QSA]
RewriteRule ^media/([^\/]+)(\/|)?$ index.php?url=home&media=$1 [L,QSA]
RewriteRule ^lang/([^\/]+)(\/|)?$ index.php?url=lang&lang=$1 [L,QSA]
RewriteRule ^page/([^\/]+)(\/|)?$ index.php?url=page&page=$1 [L,QSA]
RewriteRule ^articles(\/|)$ index.php?url=articles [NC,QSA]
RewriteRule ^articles/([^\/]+)(\/|)?$ index.php?url=articles&id=$1 [L,QSA]
RewriteRule ^articles/([^\/]+)/post/([^\/]+)(\/|)?$ index.php?url=articles&id=$1&post=$2 [L,QSA]
#
RewriteRule ^watch/?$ index.php?url=watch&id=$1 [QSA]
#lang
RewriteRule ^es/$ index.php?lang=es [QSA,L]
RewriteRule ^en/$ index.php?lang=en [QSA,L]
RewriteRule ^de/$ index.php?lang=de [QSA,L]
RewriteRule ^fr/$ index.php?lang=fr [QSA,L]
RewriteRule ^it/$ index.php?lang=it [QSA,L]
RewriteRule ^pt/$ index.php?lang=pt [QSA,L]
RewriteRule ^ru/$ index.php?lang=ru [QSA,L]
RewriteRule ^tr/$ index.php?lang=tr [QSA,L]
RewriteRule ^zh/$ index.php?lang=zh [QSA,L]
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^@([^\/]+)(\/|)$ index.php?url=home&media=$1 [QSA]
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9_]+)/([^\/]+)(\/|)$ index.php?url=home&media=$1&type=$2 [QSA]
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\/]+)(\/|)$ index.php?url=home&media=$1 [QSA]
#

I have another .htaccess in the root domain

<IfModule mod_rewrite.c>
 #Enable URL rewriting
 RewriteEngine On
 
 RewriteCond %{HTTP_HOST} !^www\. [NC]
 RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

All other pages seem to be working fine except for the admin panel works fine here
www.mymaindomain(.)com/extra/page/privacy

Only
www. mymaindomain(.)com/extra/admin
redirect my back to the root domain

Can someone help me troubleshoot this issue Thank you all

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.