• I desire a wordpress installation to sit side-by-side a codeigniter application. I wish for them to have no interaction with each other. The problem is as follows.

    My Server

    assets
    wordpress
    codeigniter
    index.php
    .htaccess

    I want wordpress to control the following

    https://site.com/blog
    https://site.com/blog/2011/09/hello-world/
    https://site.com/blog/category/uncategorized/
    https://site.com/blog/tag/untagged/

    As well as my custom post type

    https://site.com/portfolio
    https://site.com/portfolio/2011/09/hello-world/
    https://site.com/portfolio/category/uncategorized/
    https://site.com/portfolio/tag/untagged/

    I have got this working with custom post types as well as nesting wordpress within its folder and permalink delegation, all is good on wordpresses end. My problem is that I also want codeigniter to occupy the same root namespace and control some basic pages.

    https://site.com/about
    https://site.com/resume

    What I initially set up was the index.php file to contain a series of conditionals that can delegate to load which application like this

    if (0 === strpos($cache, '/blog') ||
        0 === strpos($cache, '/portfolio') ||
        0 === strpos($cache, '/feed')
    ){
        // include wordpress
    }else{
        //include codeigniter
    }

    I originally had /blog and /portfolio and when I found out about /feed I panicked are there any other wordpress pages that can be compromised?
    Is there a better way that this could be handled?

  • The topic ‘WordPress sharing root namespace’ is closed to new replies.