[SOLVED] Using Disqus with Codeigniter |
[eluser]nikefido[/eluser]
query strings are really just messy, which is bad in terms of SEO (and usability, in my opinion). Technically (coding wise), it's really all the same. $this->uri->segment vs $this->input->get hrug:
[eluser]dmorin[/eluser]
Technically (coding wise), it's not the same. The huge difference between $this->uri->segment and $this->input->get is that SEGMENTS are like a 0 based array and GET is like an associative array where you can define the key in addition to just the value. Segments work fine in a tightly controlled environment but aren't sufficient when dealing with external apis or times when you have to pass a large amount of varying information through the url. That said, I agree that they're ugly and not search engine friendly. I think the usability argument is idealistic and weak but hey, we'd all love to live in an ideal world so we might as well shoot for that also
[eluser]mattcairns[/eluser]
Thanks for all the response, and I'm sorry that it's been a while since I've been back, but I've been bogged down with projects and have not had a chance to work on this project for a while. I tried changing the 'uri_protocol' to PATH_INFO and 'enable_query_strings' to TRUE and it breaks the site. I get a '404' Error on all my pages. Is there something else I have to do? I have tried just changing 'enable_query_strings' to TRUE and that does not work either. Any advice would be appreciated.
[eluser]dmorin[/eluser]
Add this to a page somewhere: Code: print_r($_SERVER); When you go to the page that has this (with your config in a working order) it will show you the server variables. Make sure that PATH_INFO shows up as one of the elements. If it doesn't, that's an interesting situation and you should past the results of the print_r here and we can take a look.
[eluser]mattcairns[/eluser]
PATH_INFO is in there. I may have an idea as to what the problem is, but am a little confused as to how to address it. The PATH_INFO has index.php tacked onto the end, and I have rewritten my URI's to omit the index.php. I just removed my .htaccess file to see if that, in fact, was the problem. With that gone, I get a no input error. Any advice? Matt
[eluser]dmorin[/eluser]
Can you post the .htaccess you were using? So without the .htaccess file removing the index.php for the url, it does work correctly?
[eluser]nikefido[/eluser]
Also can you post what your URLs look like specifically so we can see that and compare it to the .htaccess file
[eluser]mattcairns[/eluser]
This is my .htaccess. I don't remember where I found it. Code: <IfModule mod_rewrite.c> If I remove the .htaccess file, all my pages give me a no input error. My URI's are very basic www.domain.com/DIRECTORY/CONTROLLER/FUNCTION/VARIABLE Thanks.
[eluser]dmorin[/eluser]
Mine is: Code: RewriteCond %{REQUEST_URI} !^(/index\.php|/static|/robots\.txt|/favicon\.ico) Maybe try swapping that out for your conditions and rule and see what happens.
[eluser]mattcairns[/eluser]
hi everyone, i have finally come up with a solution, and decided it would only be polite to share. the problem was 2 fold. the "no input file" problem occurred because of needing to set $config['index_page'] to "index.php?"; i found that while troubleshooting an issue on another server. my .htaccess file was doing this, without me really understanding it, and that's why my site broke when i removed the .htaccess file. after solving that issue, i found that setting $config['uri_protocol'] to "QUERY_STRING" took care of my problem. thanks for all your help! matt |
Welcome Guest, Not a member yet? Register Sign In |