Welcome Guest, Not a member yet? Register   Sign In
Wordpress hi-jacking my Codeigniter URLs
#1

[eluser]Jakobud[/eluser]
My client's homepage uses Wordpress. Lets say their website is here:

Code:
http://www.clowning.com

I'm developing a SEPARATE CodeIgniter application on the same server here:

Code:
http://www.clowning.com/salesapp/

So Wordpress is in the root directory, and CodeIgniter is in a subdirectory.

Now I've installed CodeIgniter in this location and I can get the main controller to be read fine:

Code:
<?php

class Main extends Controller {

    function Main()
    {
        parent::Controller();    
    }
    
    function index()
    {
        echo "hello world";
    }
}

However, when I add another function like this:

Code:
<?php

class Main extends Controller {

    function Main()
    {
        parent::Controller();    
    }
    
    function index()
    {
        echo "hello world";
    }

    function test()
    {
        
        echo "testing!";
    }
}

and visit the following URL:

Code:
http://www.clowning.com/salesapp/main/test/

or even this

Code:
http://www.clowning.com/salesapp/main/

I get Wordpress's 404 Not found page.

Can anyone help me with the problem here? Keep in mind, I'm not trying to integrate Wordpress w/ CodeIgniter. They are to be kept separate. I just need to keep Wordpress from hijacking the URLs.

Here is my root directory's .htaccess

Code:
# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

I thought that I could just add in the condition:

Code:
RewriteCond %{REQUEST_URI} !^/?salesapp

to force Wordpress to ignore the salesapp directory, but it doesn't seem to be working. How do I change that condition to work for anything that starts with /salesapp/ ?
#2

[eluser]Jan_1[/eluser]
why does the ci-folder has to be in the wordpress folder structure? (clean structures->less errors)
#3

[eluser]Jakobud[/eluser]
Wordpress is installed in the root of the web/html directory. Where else would I put it? Anything I add to that directory is essentially "in the wordpress folder structure". Am I misunderstanding you?
#4

[eluser]Jakobud[/eluser]
Okay so I took your advice and followed some instructions for putting Wordpress in a subdirectory. Here is the structure now:

/
/.htaccess
/index.php
/wordpress/
/salesapp/

So both Wordpress and CodeIgniter are in separate directories. However, part of installing Wordpress in a subdirectory is that you have to modify the root /index.php to point to the /wordpress/ folder.

So I still have the same problem. I still need to alter my /.htaccess to work with my /salesapp/ directory...

Any ideas?
#5

[eluser]Clooner[/eluser]
That wordpress and ci have to be in it's own directory isn't really important.
Why not simply put an extra .htaccess in you ci directory?
#6

[eluser]Jan_1[/eluser]
yes




Theme © iAndrew 2016 - Forum software by © MyBB