Giter Site home page Giter Site logo

Comments (4)

dynamodan avatar dynamodan commented on August 30, 2024

I'll look into the issue today.

Dan

On 04/28/2015 11:52 AM, Amy McCrobie wrote:

On our WordPressIgniter site, we are having trouble sharing codeigniter
generated pages on Facebook. The image, description, title, and url
don't work. We have set the open graph tags, but because those pages
throw a 404 error, facebook will not scrape them. We have these settings
checked:

Trigger with [wordpressigniter] shortcode in posts, too.
Divert 404s to WordPressIgniter
CodeIgniter grabs all SEO urls (use with caution!!)
Use CodeIgniter's native index.php to generate constants (i.e. APPPATH,
BASEPATH)

Without any of them, our codeigniter integration does not work. Our
development site is password protected, but if you would like to start
an email conversation, I could send you that information.


Reply to this email directly or view it on GitHub
#8.

from wordpressigniter.

tuonela avatar tuonela commented on August 30, 2024

Great! Thank you.

from wordpressigniter.

dynamodan avatar dynamodan commented on August 30, 2024

This is fixed now, please update by checking out from here or getting version 1.4 from the WordPress plugin repository.

The problem was that WordPress was throwing 404's for any url that represented a CodeIgniter path that was different than the exact url that matched the WordPress page. For example, if you had a URL like this, and it triggered CodeIgniter by matching a WordPress page:

http://example.com/codeigniter

But you also had a path like this that triggered CodeIgniter:

http://example.com/codeigniter/somefunction

Then it would throw a 404 because it's not found in WordPress' scheme of things. I suspect that's what you're having happen in your pages that facebook isn't honoring.

But now, any page that triggers CodeIgniter content will throw a 200 status code by default. Then, if you have a CodeIgniter catchall page that you intend to use to serve up a "CodeIgniter 404 Not Found" error, here's what to do. In the CodeIgniter function (mine, for example is main/catchall), do this:

function catchall() { global $CI_STATUS; $CI_STATUS = 404; ... }

Or, you can set the $CI_STATUS global variable to whatever you want, such as a 403 unauthorized if you pleased, for pages behind a special login if you needed.

from wordpressigniter.

tuonela avatar tuonela commented on August 30, 2024

Awesome! That took care of the issue. Thank you for the quick response.

from wordpressigniter.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.