Strange URL Suffix behavior |
[eluser]theprodigy[/eluser]
I have an htaccess file in place that gets rid of the need for "index.php" in the URL. All is working great......except for the URL Suffix. If I set $config['url_suffix'] = "html", it works fine. My controllers appear as homehtml, abouthtml, etc, and CI renders them as it's supposed to; but as soon as I set it equal to ".html" (I add the dot), the links render correctly (they become home.html, about.html, etc), but when I try to visit the page, I get a 404. The file setup that I am using is: /CI -/application - -/hypertext - - -/config - - -/controllers - - -/etc -/system - -/cache - -/codeigniter - -/etc /public_html -/HyperText - -/css - -/images - -/js - -index.php - -.htaccess I have one domain name that points to public_html, and one domain name that points to HyperText (HyperText is the one that is causing this strange behavior). The HyperText folder is the root of that domain Not sure if this will help any, but I am using BlueHost as my hosting. I'm not sure if the htaccess file is what is stopping me or not but here it is just in case: Code: <IfModule mod_rewrite.c> Thanks in advance for your help
[eluser]theprodigy[/eluser]
OK, I have an update. When I change the url_suffix to be ".html" (with the dot), it works just fine if I include index.php in the url, but without the index.php it goes to a 404. If I set the url suffix to be anything other than something starting with a dot, I don't need the index.php. I'm guessing this has something to do with my htaccess file? Once again, thanks in advance for any help you can offer
[eluser]Dam1an[/eluser]
I just tested with a .html suffix, and it works fine for me, my .htaccess is Code: DirectoryIndex index.php
[eluser]theprodigy[/eluser]
I just changed my htaccess file to look like yours, and now it is causing my site to act strange. No matter what link I click on, I see the home page. My Site is HyperText Web Design I've never run into this before. I'm wondering if it has something to do with the folder layout, web root (one inside the other, which one goes in htaccess?), and htaccess. The way Blue Host does their Add On domains is really strange. Not only do they setup the folder inside of the webroot of your main domain, but the also setup a sub-domain. You can get to the same home page by going to 3 different places: www.hypertextwebdesign.com hypertext.grargs.com www.grargs.com/HyperText Not sure if that affects the htaccess or not.
[eluser]Dam1an[/eluser]
My directory structure is Code: - CodeIgniter_1.7.1
[eluser]theprodigy[/eluser]
so, if it's not the folder structure, or the htaccess file (since I am using the one you posted), what else could it be? There is only one other htaccess file on the server (in the public_html folder), but all it does is: AddHandler application/x-httpd-php5 .php What else could it be?
[eluser]theprodigy[/eluser]
ok, I turned CI's log threshold to 4 (log everything). Here is what the system log shows: Code: DEBUG - 2009-05-26 09:32:50 --> Config Class Initialized Upon seeing "No URI present. Default controller set.", I put a line of code at the top of the home controller to output the uri string, followed by a break tag. Then I clicked on some links. The only thing outputting is the break tag. No uri string whatsoever. So, there is definitely something not working right here. Any ideas?
[eluser]theprodigy[/eluser]
not exactly sure what you mean by trying all URI protocols, but I modified what I'm outputting at the top of the home controller to: Code: echo $this->uri->uri_string()."<br />"; Now, I get a blank line at the top (due to break tag), and then "/home/index/" (which is the URI segments that it is routing me to). What else can I try? Please explain your question about URI protocols. Thanks
[eluser]Dam1an[/eluser]
3rd item down in the config file Try all the options |
Welcome Guest, Not a member yet? Register Sign In |