The requested URL Not Found |
[eluser]matakwane[/eluser]
Hello everybody, I'm developing CMS application in CI. Everything works good on my local host. I deploy code to server. I use a /dev/ folder here. So I put RewriteBase /dev/ into my .htaccess file, edit my base_url in config. Homepage is loaded properly. Links are now without /dev/ in href so I add jQuery code to fill dev into href (this technique worked for me on another project well). With jQuery links are looks good now (when I hover link the path is good), but when I click to the link a have an error: Not Found The requested URL /dev/application/www.sonray.com/home was not found on this server. And when I try to call some page directly I have same error, only homepage work I spend whole day on this problem and I don't know what to do Thanks for help!
[eluser]danmontgomery[/eluser]
Your links are for www.sonray.com, not for http://www.sonray.com, so they are interpreted as relative paths.
[eluser]matakwane[/eluser]
[quote author="noctrum" date="1273605259"]Your links are for www.sonray.com, not for http://www.sonray.com, so they are interpreted as relative paths.[/quote] Hi noctrum, thanks for reply. When I copy link location I have this: http://www.sonray.com/dev/about-sonray In href is this: /dev/about-sonray and my $config['base_url'] = 'http://'www.sonray.com/dev/application/www.sonray.com/'; I don't know where I made a mistake
[eluser]danmontgomery[/eluser]
Code: $config[‘base_url’] = ‘http://‘www.sonray.com/dev/application/www.sonray.com/’; Well, here is a good place to start... You seem to have a mix of server path and web path going on here, also the extra '?
[eluser]matakwane[/eluser]
$config['base_url'] = 'http://' . ($_SERVER['REMOTE_ADDR'] != '127.0.0.1' ? 'www.sonray.com/dev/' : 'sonray.hot') . 'application/www.sonray.com/'; this is copy of line from config.. when I posted it before I forgot delete '. I think that this is setup correctly..
[eluser]danmontgomery[/eluser]
The web path to your codeigniter index.php is http://www.sonray.com/dev/application/www.sonray.com?
[eluser]matakwane[/eluser]
no the main index.php is on http://www.sonray.com/dev I have to applications one is www.sonray.com and second is cms.
[eluser]danmontgomery[/eluser]
base_url is the web path to your index.php, you should never be pointing to the application directory. You can change the location of the application folder in index.php.
[eluser]matakwane[/eluser]
When I remove /application/www.sonray.com from base_url I have CI errors.. But base_url is pointed to index.php of /dev/application/www.sonray.com/ and base_url for cms application goes to /dev/application/cms, where index.php is (index.php for application not main index.php) I used these settings before and don't have problems with this.. |
Welcome Guest, Not a member yet? Register Sign In |