Welcome Guest, Not a member yet? Register   Sign In
Whenever I enter a url which isn't the default, I get redirected to dir above root
#2

[eluser]d1a8lo24[/eluser]
Ok I think I was the person that suggested the code for the .htaccess file.

Now it is true that CI out of the box uses the index.php/controller/method URL but in order to get search engine friendly URLS we need to remove the index.php and thats where the .htaccess file comes in and now we are left with www.example.com/controller/method

Now if your links still have the index.php just remove the index.php from your links and also in your configuration file correct the following.

Code:
// from
$config['index_page'] = 'index.php';
// To
$config['index_page'] = '';

If you want to use the index.php way then just remove your .htaccess file and you should be all set. If your still having problems accessing your CSS files make sure your paths are correct and don't add any .htaccess files that re write paths for now.

Code:
// If your paths to your css files look like this and you are having problems.
../../path/to/css

// Try doing this.
http://www.example.com/path/to/css


Messages In This Thread
Whenever I enter a url which isn't the default, I get redirected to dir above root - by El Forum - 04-12-2011, 04:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB