.htaccess problem with CI 2.0 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: .htaccess problem with CI 2.0 (/showthread.php?tid=39558) |
.htaccess problem with CI 2.0 - El Forum - 03-14-2011 [eluser]bigmike7801[/eluser] I am trying to eliminate the "index.php" from my urls. I have it working on my MAMP server just fine but I have also setup a site under a reseller account that has the url of http://55.555.555.555/~leads/ (I am using 5's in-place of the actual IP address) I have placed both the application and system folder outside of the root (public_html) directory. Here are what some of my config.php variables are set to that relate to this problem Code: $config['base_url'] = 'http://55.555.555.555/~leads/ I have tried several methods of the mod rewrite. I have tried this one in my public_html directory -> http://codeigniter.com/wiki/mod_rewrite/ I have tried this one in my root directory -> http://codeigniter.com/wiki/Dreamhost_.htaccess/ When I login to cpanel, it shows my home directory as "/home/leads". I have tried changing $config['uri_protocol'] to "REQUEST_URI" but that hasn't worked either. I'm about out of ideas and would really appreciate any help. Thanks -Mike .htaccess problem with CI 2.0 - El Forum - 03-14-2011 [eluser]bubbafoley[/eluser] try this Code: RewriteEngine On .htaccess problem with CI 2.0 - El Forum - 03-14-2011 [eluser]bigmike7801[/eluser] I tried your sugguestion in both my root and my public_html folder and both just made every page point to the file site in $route['default_controller'] .htaccess problem with CI 2.0 - El Forum - 03-14-2011 [eluser]bigmike7801[/eluser] [quote author="bubbafoley" date="1300151822"]try this Code: RewriteEngine On I tried this in addition to: Quote:$config['uri_protocol'] = "REQUEST_URI"; And that seemed to do the trick. +1 to you sir, I appreciate the help. .htaccess problem with CI 2.0 - El Forum - 03-14-2011 [eluser]bubbafoley[/eluser] d'oh. change the last line to Code: RewriteRule ^(.*)$ index.php/$1 [L] This works if you have uri_protocol set to AUTO, PATH_INFO, or ORIG_PATH_INFO. it works the first way if you have the uri_protocol set to QUERY_STRING or REQUEST_URI .htaccess problem with CI 2.0 - El Forum - 03-14-2011 [eluser]bubbafoley[/eluser] [quote author="bigmike7801" date="1300153660"][quote author="bubbafoley" date="1300151822"]try this Code: RewriteEngine On I tried this in addition to: Quote:$config['uri_protocol'] = "REQUEST_URI"; And that seemed to do the trick. +1 to you sir, I appreciate the help.[/quote] nice moves. you beat me to it .htaccess problem with CI 2.0 - El Forum - 03-14-2011 [eluser]bigmike7801[/eluser] [quote author="bubbafoley" date="1300153752"]d'oh. change the last line to Code: RewriteRule ^(.*)$ index.php/$1 [L] This works if you have uri_protocol set to AUTO, PATH_INFO, or ORIG_PATH_INFO. it works the first way if you have the uri_protocol set to QUERY_STRING or REQUEST_URI[/quote] I'm not seeing any difference between the original last line and the modified last line. .htaccess problem with CI 2.0 - El Forum - 03-14-2011 [eluser]bubbafoley[/eluser] [quote author="bigmike7801" date="1300154193"][quote author="bubbafoley" date="1300153752"]d'oh. change the last line to Code: RewriteRule ^(.*)$ index.php/$1 [L] This works if you have uri_protocol set to AUTO, PATH_INFO, or ORIG_PATH_INFO. it works the first way if you have the uri_protocol set to QUERY_STRING or REQUEST_URI[/quote] I'm not seeing any difference between the original last line and the modified last line.[/quote] no '?' after index.php .htaccess problem with CI 2.0 - El Forum - 03-14-2011 [eluser]bigmike7801[/eluser] It actually isn't working that way if I have $config['uri_protocol'] = 'PATH_INFO'; |