• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.htaccess problem with CI 2.0

#1
[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/
$config['index_page'] = '';
$config['uri_protocol']    = 'PATH_INFO';

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

#2
[eluser]bubbafoley[/eluser]
try this

Code:
RewriteEngine On
RewriteBase /~leads/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

#3
[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']

#4
[eluser]bigmike7801[/eluser]
[quote author="bubbafoley" date="1300151822"]try this

Code:
RewriteEngine On
RewriteBase /~leads/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
[/quote]

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.

#5
[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

#6
[eluser]bubbafoley[/eluser]
[quote author="bigmike7801" date="1300153660"][quote author="bubbafoley" date="1300151822"]try this

Code:
RewriteEngine On
RewriteBase /~leads/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
[/quote]

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 Big Grin

#7
[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.

#8
[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

#9
[eluser]bigmike7801[/eluser]
It actually isn't working that way if I have $config['uri_protocol'] = 'PATH_INFO';


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.