Welcome Guest, Not a member yet? Register   Sign In
How to run wordpress along side CI?
#1

[eluser]q.elizabeth[/eluser]
Hello everyone,

I have a blog that i installed inside the webroot called "blog". How do i get CI to ignore requests to www.example.com/blog So that wordpress can run normally?

I'm currently using htaccess to remove index.php from my urls, and i have no need to integrate templates, etc..

Thanks for the help!
#2

[eluser]jedd[/eluser]
Hi q.elizabeth and welcome to the CI forums.

[quote author="q.elizabeth" date="1259696132"]
I'm currently using htaccess to remove index.php from my urls ...
[/quote]

Use .htaccess to ignore the blog directory. I'm assuming that you mean blog is the name of your wordpress install, and not your CI install.

More information is better than none, so feel free to post your current .htaccess.
#3

[eluser]q.elizabeth[/eluser]
Thanks jedd!,

My htaccess file contains:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|js|css|)
RewriteRule ^(.*)$ /index.php/$1 [L]

Any idea about what should i should add in order for ci to ignore request to blog? I'm not to experienced with mod_rewrite

Thanks again!
#4

[eluser]rogierb[/eluser]
something like
Code:
RewriteCond $1 !^(index\.php|images|js|css|blog)

should ignore anything with blog
#5

[eluser]q.elizabeth[/eluser]
Great, thanks! I should've tried that. It works perfect.

Thanks again everyone Smile
#6

[eluser]CroNiX[/eluser]
Or you can use something like:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

which tells apache that if the filename or directory exists (ie, is actually a file/dir in the filesystem) to not use CI to process that request. So it would ignore anything in your /blog directory because they are physical files.




Theme © iAndrew 2016 - Forum software by © MyBB