Anchor/domain problem |
Hello,
I have been searching the web for a solution to this, but not been able to find, or understand (excuse my English), one. Here is the problem: Url_helper command example with base_url set to empty in config.php file: anchor('class'); gives domain/index.php/class which works, but turns the next address into ip/index.php/class, which is not desirable. Helper command example with base_url set to domain: anchor('class'); gives domain/index.php/domain/index.php/class which, naturally, does not work. In any case, I would prefer to use the anchor command, have it give the correct address, and also retain the domain name in the address. How can I do that? Timo
This is how you set the base url:
PHP Code: $config['base_url'] = 'http://www.your-domain.com/'; And here is a good working .htaccess file: Code: <IfModule mod_rewrite.c> Try that and see if it works for you. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |