0

My codeigniter project is working on local server and also in another domain. But when I am upload it in Digitalocean with a ip pages show up but it gives a 404 error in the console.

Here is the link:

http://139.59.78.131/custom-shirt/fabric

.htaccess

<IfModule mod_rewrite.c>
  RewriteEngine On  
  RewriteBase /

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
  ErrorDocument 404 /index.php
</IfModule>
11
  • Set your base_url in config.php $config['base_url'] = 'http://localhost/yourproject/'; Commented Jun 1, 2017 at 7:45
  • Check your filenames and class names of controllers etc make sure only have the first letter uppercase. Commented Jun 1, 2017 at 7:46
  • I hosted it in Digitalocean Commented Jun 1, 2017 at 7:46
  • The put your domain there $config['base_url'] = 'http://www.yourdomain.com/' Commented Jun 1, 2017 at 7:47
  • It doesn't point to any domain yet. Commented Jun 1, 2017 at 7:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.