HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

[Solved] Problem with subdomains

Login / Search

 [ Join | More ]
 Add topic 
#105140 (In Topic #20497)

Fan in action


Sorry if this has already been addressed. When I install other applications in subdomains, I've noticed some of their text editor commands (i.e., adding links or switching to HTML view) open windows that show the main site with a 'does not exist' error page. So I have two questions...

Is this due to the way Zones function (being folders) - that OcPortal views every folder in the root directory as part of itself? Is there a workaround to prevent that from happening short of not using subdomains or having to install them in a folder within a folder?

I know...OcPortal has a lot and it might seem bonkers that anyone could need more, lol. It is a great CMS that has been serving me well overall - so it's a keeper - it's just that it isn't an LMS. I'm sure with the right skills, they could be 'married', but that's not going to happen any time soon. Thus, a separate system it has to be.

I'm just trying to figure out how to make it where OcP doesn't interfere with other installations.

Thank you, and if you need clarification on anything or screen captures, please let me know.

Last edit: by Ennea
Back to the top
Item has a rating of 5 (Liked by Ennea)  


If you are not using "new style short URLs" try removing this from your .htacccess file:


# These have a specially reduced form (no need to make it too explicit that these are Wiki+)
#  We shouldn't shorten them too much, or the actual zone or base url might conflict
RewriteRule ^(site|forum|adminzone|cms|collaboration)/s/([^\&\?]*)\.htm$ $1/index.php\?page=cedi&id=$2 [L,QSA]
RewriteRule ^s/([^\&\?]*)\.htm$ index\.php\?page=cedi&id=$1 [L,QSA]

# These have a specially reduce form (wide is implied)
RewriteRule ^(site|forum|adminzone|cms|collaboration)/galleries/image/([^\&\?]*)\.htm$ $1/index.php\?page=galleries&type=image&id=$2&wide=1 [L,QSA]
RewriteRule ^(site|forum|adminzone|cms|collaboration)/galleries/video/([^\&\?]*)\.htm$ $1/index.php\?page=galleries&type=video&id=$2&wide=1 [L,QSA]
RewriteRule ^(site|forum|adminzone|cms|collaboration)/iotds/view/([^\&\?]*)\.htm$ $1/index.php\?page=iotds&type=view&id=$2&wide=1 [L,QSA]

# These are standard patterns
RewriteRule ^(site|forum|adminzone|cms|collaboration)/([^/\&\?]+)/([^/\&\?]*)/([^\&\?]*)\.htm$ $1/index.php\?page=$2&type=$3&id=$4 [L,QSA]
RewriteRule ^(site|forum|adminzone|cms|collaboration)/([^/\&\?]+)/([^/\&\?]*)\.htm$ $1/index.php\?page=$2&type=$3 [L,QSA]
RewriteRule ^(site|forum|adminzone|cms|collaboration)/([^/\&\?]+)\.htm$ $1/index.php\?page=$2 [L,QSA]
RewriteRule ^([^/\&\?]+)/([^/\&\?]*)/([^\&\?]*)\.htm$ index.php\?page=$1&type=$2&id=$3 [L,QSA]
RewriteRule ^([^/\&\?]+)/([^/\&\?]*)\.htm$ index.php\?page=$1&type=$2 [L,QSA]
RewriteRule ^([^/\&\?]+)\.htm$ index.php\?page=$1 [L,QSA]

I suspect that our URL pattern is conflicting with the  real URLs of the other software.

Alternatively you could try adding this above all the other RewriteRule lines:


RewriteCond $1 ^\d+.shtml [OR]
RewriteCond %{DOCUMENT_ROOT}/$1 -f [OR]
RewriteCond %{DOCUMENT_ROOT}/$1 -l [OR]
RewriteCond %{DOCUMENT_ROOT}/$1 -d
RewriteRule (.*) - [L]

Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top

Fan in action

Thank you much, Chris!  

It worked to remove that bigger chunk as I use the older short URL style.

Back to the top
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: