Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9177527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:20:47+00:00 2026-06-17T17:20:47+00:00

Here’s a weird question for everyone. I’ve got a situation where an existing site

  • 0

Here’s a weird question for everyone. I’ve got a situation where an existing site has wordpress running on it as the main CMS to the site, there’s some additional code which can’t be implemented in WP because of URL structures etc so we’d like to put CI on the same host.

However, there’s two potential entry points needed for CI on that site – lets call them /userside and /adminside

I want both to share the same application and system folders which are all in the same accessible folder space.

I’ve got /userside working co-existing with WP quite easily.

Here’s the .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteRule ^/userside [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /userside/index.php [L]

RewriteRule ^/adminside [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /adminside/index.php [L]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

My folder layout is as follows

FTP ROOT/
    ci/ <- codeigniter root
      application/
      system/
    http/
      index.php <- WP index.php
      adminside/
        index.php <- CI index.php
      userside/
        index.php <- CI index.php
      ... wp-content etc

I’ve copied userside’s files to adminside and tried symlinking as well but neither work.

In CI’s application/config i’ve modified the base_url to be:

list($_trash, $_base, $rest) = explode('/', $_SERVER['REQUEST_URI'], 3);
$config['base_url']     = "http://".$_SERVER['HTTP_HOST']."/".$_base;

Which means it automatically puts the first segment of the URI as the application base, i’ve debugged this code and it sets it correctly.

Now here’s the problem, when I access /userside/somecontroller, it works, however, when I access /adminside/somecontroller it doesn’t. I get a 404 page.

I can get it to access the default controller’s index() function by just accessing /adminside – that works but not when I specify a controller and method.

eg:

http://www.mysite.com/userside/mycontroller/mymethod <- works
http://www.mysite.com/userside/mycontroller/mymethod <- doesn’t work – 404 displayed

/userside was set up first and I can’t see anywhere that ties CI to /userside other than in application/config/config.php

Permissions have been checked and are identical, owners are identical.

Anyone got an idea why this isn’t working? I don’t want to have to split the site into a subdomain as we have specific reasons and as it works with /userside there’s only something simple keeping me from making /adminside work as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:20:48+00:00Added an answer on June 17, 2026 at 5:20 pm

    This was a little less complicated than I thought.

    You simply put CI’s .htaccess in the sub-folder you want to run CI in and then set the appropriate site URL variables to match.

    I did find a document that showed how to give you access to all of WP’s libraries from CI by simply loading wp-load.php from the root of the WP side in CI’s index.php.

    Hope this helps other people.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here are some facts about my app followed by a question My app has
Here's my situation. I have a DotNetNuke application. I want to link to an
Here is the situation. I am making changes to an application but I do
Here's a newbie question, but how do I use dates for the x-axis in
Here is my situation: I am making a countdown app which works fine but
Here is my scenario. I have a website running under AppPool1 and that works
Here are the tables I have: Table A which has entries with item and
Here's my situation. I've noticed that code gets harder to maintain when you keep
Here's the situation, i want to have a user that can enter time on
Here's the code I'm running. Basically I scrape data, and place them into simple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.