CodeIgniter Forums
Redirect Problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Redirect Problem (/showthread.php?tid=70067)



Redirect Problem - Navish31 - 02-15-2018

Hello, i have received a website powered by CodeIgniter, the home page work, but when i click on Register, i have 404 error page.
I'm on a Virtual Host with xampp.

Here's the base url

PHP Code:
$config['base_url'] = 'http://vc-rp.net'

index_page

PHP Code:
$config['index_page'] = ''

The Database is setup correctly.


RE: Redirect Problem - Elias - 02-15-2018

Add a trailing slash:

$config['base_url'] = 'http://vc-rp.net/';


RE: Redirect Problem - Navish31 - 02-15-2018

It doesn't work, it tell me error 404 Object not found.


RE: Redirect Problem - InsiteFX - 02-15-2018

This can be a number of things.

Is your Editors root path for your project setup correct?

Do you need a sub path mapping in your editor?

If you changed the CodeIgniter ./system and ./application paths did you set these in index.php ?

VHOST Settings:

Code:
#--------------------------------------------------------------
# HTTP:
#--------------------------------------------------------------
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/myproject/public_html"
    ServerName myproject.localhost
    ServerAlias myproject.localhost
    <Directory "C:/xampp/htdocs/myproject/public_html">
        Order allow,deny
        Allow from all
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

#--------------------------------------------------------------
# HTTPS:
#--------------------------------------------------------------
<VirtualHost *:443>
    DocumentRoot "C:/xampp/htdocs/myproject/public_html"
    ServerName myproject.localhost
    ServerAlias myproject.localhost
    SSLEngine on
    SSLCertificateFile "conf/ssl.crt/server.crt"
    SSLCertificateKeyFile "conf/ssl.key/server.key"
    <Directory "C:/xampp/htdocs/myproject/public_html">
        Options All
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

#--------------------------------------------------------------



RE: Redirect Problem - Navish31 - 02-16-2018

Everything looks ok, I do not understand too where the error can come from. The site was online on a server, everything was working, but not in localhost.


RE: Redirect Problem - InsiteFX - 02-16-2018

Check your ./application/config/routes.php file and see what is
the default controller then trace out the view code.


RE: Redirect Problem - dave friend - 02-16-2018

(02-15-2018, 08:30 AM)Navish31 Wrote: It doesn't work, it tell me error 404 Object not found.

Is that error message 100% accurate? I ask because that exact phrase is not found anywhere in CodeIgniter's core code.

Or, is that not a CodeIgniter error page? Is it instead a PHP error screen?