![]() |
CI + WordPress - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: CI + WordPress (/showthread.php?tid=18254) |
CI + WordPress - El Forum - 04-30-2009 [eluser]CodeIgniterNewbie[/eluser] I have a CI application which I want to run side by side with WordPress. CI will handle the core features of the application; WordPress will handle the simple pages (e.g. informational, etc.). I don't want all the WordPress pages access through it's own subdomain or directory. I want the integration to appear seamless. So, I want something like the following: www.domain.com/ (CI handles this) www.domain.com/my-app/ (CI handles this) www.domain.com/privacy/ (WordPress handles this) www.domain.com/about/person-1/ (WordPress handles this) The WordPress pages were working until I deployed my CI application to the same server. Now, when I try to access the WordPress pages, I get CI's 404 page. How do I handle this? CI + WordPress - El Forum - 04-30-2009 [eluser]Dam1an[/eluser] Are you using htaccess which routes everything through the CI index.php? CI + WordPress - El Forum - 04-30-2009 [eluser]CodeIgniterNewbie[/eluser] Where do I check that? I've been using routes.php heavily. Does that helo? CI + WordPress - El Forum - 04-30-2009 [eluser]Dam1an[/eluser] in your web root, check if their's a folder called .htaccess If you can call your URL like Code: www.domain.com/controller/function/arg If you have to use URLs like this Code: www.domain.com/index.php/controller/function/arg If you are, you need to allow the wordpress paths in the htaccess CI + WordPress - El Forum - 04-30-2009 [eluser]Stefano G[/eluser] Hello, my site (http://www.stefanogiordano.it) is made of a normal CI installation (you can browse around using the navigation menu) and a Wordpress installation accessible via the following url: http://www.stefanogiordano.it/blog without using any htaccess files. I didn't link the blog section in the navigation menu because it is still under construction, but as you can see I made a WP template that has the same look of my website and then the magic is done! This is possible because I have installed WP under the /blog directory in my site (at root level) you could do the same but I really don't see a true added value if you don't want to use all WP features... cheers Stefano CI + WordPress - El Forum - 04-30-2009 [eluser]CodeIgniterNewbie[/eluser] @Dam1an I do call my URLs like this: www.domain.com/controller/function/arg This is the default way CI does things, right? So, how do I "allow the wordpress paths in the htaccess?" @Stefano G I'm trying to avoid the /blog/ in the URL. CI + WordPress - El Forum - 04-30-2009 [eluser]Dam1an[/eluser] Well the standar htaccess file is Code: DirectoryIndex index.php so I'd assume changing the condition to be Code: RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico|privacy|about) But the problem with this is, if you have privacy or about in a CI URL, it'll probably fail CI + WordPress - El Forum - 04-30-2009 [eluser]CodeIgniterNewbie[/eluser] I'll give it a try -- and make sure there are no duplicate URLs between CI and WP. Thanks. CI + WordPress - El Forum - 04-30-2009 [eluser]CodeIgniterNewbie[/eluser] Just out of curiosity, is there anything I can do in the routes.php to handle this? CI + WordPress - El Forum - 05-01-2009 [eluser]CodeIgniterNewbie[/eluser] My .htaccess file looks like this: Code: RewriteEngine on Also, per http://httpd.apache.org/docs/1.3/howto/htaccess.html, Quote:In general, you should never use .htaccess files unless you don't have access to the main server configuration file. I'm on a dedicate hosting plan. What is the alternative way to handle this? |