Welcome Guest, Not a member yet? Register   Sign In
Removing index.php from url
#2

[eluser]adamfairholm[/eluser]
I'm not sure this is the answer you're looking for, but it is what I do to overcome this problem.

The .htaccess effectiveness seems to vary from server environment to server environment. Sometimes there even needs to be a Wiki article for a certain hosting [email=http://codeigniter.com/wiki/Dreamhost_.htaccess/]provider[/email].

So there may be other forum members who can correct me, but it my experience its unrealistic to have one .htaccess file in your dev environment that will work on different production server environments.

What I've started doing is creating two config variables:

Code:
$config['base_url'] = "http://localhost/ot/";
$config['link_url'] = "http://localhost/ot/index.php/";

So on my dev environment I don't have to worry about .htacces, and when I get the site to the production server, I find an .htaccess that works, and change my configs to:

Code:
$config['base_url'] = "http://localhost/ot/";
$config['link_url'] = "http://localhost/ot/";

Kind of redundant and inelegant as a solution, but it works for me. If you search for .htaccess on the forums there are a ton of different .htaccess files to try for different environments. In my case, I wasn't really knowledgeable about .htaccess so I tried different ones until I started taking more educated stabs at what they server will like.


Messages In This Thread
Removing index.php from url - by El Forum - 06-30-2008, 09:09 PM
Removing index.php from url - by El Forum - 06-30-2008, 10:37 PM
Removing index.php from url - by El Forum - 06-30-2008, 10:45 PM
Removing index.php from url - by El Forum - 07-01-2008, 10:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB