Welcome Guest, Not a member yet? Register   Sign In
Use CI-based blog on not-CI project.
#1

[eluser]IzumeRoot[/eluser]
Hello Friends.
Who knows how I can use CI-based blog (forum, guest book and another) on not-CI project (cleanly php)? And another question. how can I use not-CI blog (and another) on CI-based project?
#2

[eluser]Phil Sturgeon[/eluser]
Are you converting or integrating? Your question is not formed amazingly well, but if you are looking to run CI side-by-side with normal PHP then you should be careful. Using CI's mod_rewrite will mean you cant have CI's index.php in the same directory as your other CI without wrecking it.

If you want to include templates and classes from your clean PHP then go ahead, CI wont break anything like that from happening. If you want integrated logins then thats easy enough too, instead of using $_SESSION to check, use $this->session->userdata(). Very easy to run them side by side as long as there is no mod_rewrite spoiling your fun.
#3

[eluser]IzumeRoot[/eluser]
Thank you for help!
For example:
I have some project on cleanly PHP (without CI). This is site like www.mysite_bla_bla_bla.com. And I have another project - blog (CI project). I want put blog's directory into main directory of my first project (www.mysite_bla_bla_bla.com/blog/). Blog must work and site must work. This 2 projects must be side-by-side. How can I do it?
#4

[eluser]Phil Sturgeon[/eluser]
Using CI JUST to make a blog is extreme overkill. If you were going to expand on this in the future then it would be fair enough, but for this to be set up it would be hard for that to work.

You have two options here really. Install CI in root as normal, but make your own mod_rewrite (as in, dont rewrite ALL URL's, only those blog related ones).

OR

Install your CI into a directory called blog/ with only one controller, then use routing to remove the controller name. So you will have site.com/blog/methodname
#5

[eluser]IzumeRoot[/eluser]
My question about this:
[quote author="thepyromaniac" date="1192389273"]
Install CI in root as normal, but make your own mod_rewrite (as in, dont rewrite ALL URL's, only those blog related ones).[/quote]
I mean, how can I do it? Can you write these rules for example?
#6

[eluser]Phil Sturgeon[/eluser]
You'll never learn if you get spoonfed the whole way!

You can actually just use this one. Any files that actually exist should be called fine, and your CI will grab anything thats not. Give it a try, if you can pester me for some custom rules :p

Quote:RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]




Theme © iAndrew 2016 - Forum software by © MyBB