0

I built a web app in Codeigniter and want to deploy it on a server that will only be for internal use. I can access it by an ip address 55.555.555.555/app but it gives me codeigniter's default 404 page even though I have a custom coded 404 page. I checked to make sure my htaccess file is working by creating an error and it is being read. Currently I have the following code in my htaccess file next to my index.php.

 <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [R]
 </IfModule>

The server is running 14.04.1-Ubuntu not sure if that helps. Any help to point me in the right direction is much appreciated.

13
  • what's your question? how to create a custom 404? or how to access the app? Commented Sep 15, 2015 at 13:00
  • If you are stuck in redirecting your app to 404 page, Have $route['404_override'] = 'controller/function_name' as a variable in config/routes.php. Commented Sep 15, 2015 at 13:16
  • I access it localhost/app/ but I uploaded it to the live server that will be using only and ip address(no domain name, its an internal app only) so it should now be 44.494.494.494/app and I was hoping it would be a seamless transfer. When I visit that I am expecting my app to be there but I get a default 404 page. The reason I threw that in there was to let someone know I built a custom 404 page that is not being routed also but the codeigniter install is somewhat working. Commented Sep 15, 2015 at 13:49
  • Does it show 404 on localhost? Commented Sep 15, 2015 at 13:52
  • No, on my localhost it works fine. Commented Sep 15, 2015 at 13:57

1 Answer 1

0

If you try to access the app locally, use the local network ip(usually 192.xxx.xx.xx..) in your url, not the external one. If you use the external ip, you must forward a port, usually port 80, which is the default for web http protocol.

EDIT: And that's how you find your local ip on Ubuntu: https://askubuntu.com/questions/430853/how-do-i-find-my-internal-ip-address

Sign up to request clarification or add additional context in comments.

Comments

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.