Live site paths are not working but its working on dev site |
[eluser]fiktionvt[/eluser]
I am developing on a local host machine and I have a link to a contacts page. This works on my local box but when I deploy it to my live site it does not work. The first assumption is that I have my paths wrong but its not even recognizing my default controller. I have a default controller named site which is set in the $default_controller variable in the config. When I am on my local machine I can type in http://localhost:81/ci/index.php/site it will just default to my index() function and show the homepage. When I am on my live site and i go to http://livesite.com/index.php/site it says file is not found. Can anyone help me with this its really holding up my work. Thanks!
[eluser]InsiteFX[/eluser]
Did you change the base_url in application/config.php ? Also make sure that index.php is pointing to the correct system and application paths. InsiteFX
[eluser]fiktionvt[/eluser]
I did change the base_url() so my base_url in my config looks like this Code: $root = "http://".$_SERVER['HTTP_HOST']; I have not changed my index.php file it still points to the 'application' folder and I did not change the name of that folder so that should be working. In my view the link to the contact page looks like this Code: <li id="nav_contact"><a href="<?php echo site_url('site/contact')?>"><span>Contact</span></a></li> so site is my controller name with the function contact() When I echo out site_url() on my localhost site it comes up as this: http://localhost:81/ci/index.php When I echo out site_url() on my live site it cmes up as this http://livesite.com/index.php I dunno whats wrong everything is working on my dev box. Please any help would be greatly appreciated.
[eluser]InsiteFX[/eluser]
Place this at the end of - application/constants.php Code: /* Place this in - application/config.php Code: $config['base_url'] = BASE_URL; InsiteFX
[eluser]fiktionvt[/eluser]
Thanks for the help, this however still did not work. I don't think the issue is with the paths as much as it is that I can not access my controller. For some reason I can no type in my live site livesite.com/index.php/site , where site is my controller it says the file is not found. I can do this on my local machine localhost:81/ci/index.php/site and that will bring my to my homepage. This is really frustrating I can not figure out what is going on.
[eluser]InsiteFX[/eluser]
If this is a Parked Domain it will display their page not yours! If it is parked on your domain then it will display If it is parked on your hosting provide they send it to their own page not yours! InsiteFX
[eluser]fiktionvt[/eluser]
So I decided to download a fresh copy of code igniter and create a simple example of a link on my site just to see if I can get it to work. So the code that I have put in the constants.php file is this. Code: // Base URL (keeps this crazy stuff out of the config.php Then in my config file I have Code: $config[base_url] = BASE_URL; So what I have done in the welcome_message.php file I have inserted this Code: <a href="<?php echo site_url('welcome/test')?>"><span>Home</span></a> So there is a link to a view called test.php. IT just prints TEST!! when it works. IT works on my local machine but when I upload it to my live site it gives me an error of file not found. You can see the result if you go to the site www.theprizeshark.com that is where I am trying to put it. I am thinking it is maybe how I am uploading it to my server? When I log into my site through ftp I have these CI files system index.php but on my local machine in my WWW directory it looks like this ci |-system |-index.php I dunno if this makes a difference but it loads the welcome_message.php page okay so I am sure that its working. Thanks for the help
[eluser]fiktionvt[/eluser]
Do I need to modify my .htaccess file or my php.ini file or anything? This is driving me nuts. |
Welcome Guest, Not a member yet? Register Sign In |