WordPress.org

Ready to get started?Download WordPress

Forums

WordPress sharing root namespace (1 post)

  1. thomasreggi
    Member
    Posted 2 years ago #

    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

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

    As well as my custom post type

    http://site.com/portfolio
    http://site.com/portfolio/2011/09/hello-world/
    http://site.com/portfolio/category/uncategorized/
    http://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.

    http://site.com/about
    http://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?

Topic Closed

This topic has been closed to new replies.

About this Topic