Xampp redirects to /xampp

1.4k views Asked by At

I just installed codeIgniter on my xampp but whenever I try to go to it's folder (localhost/ci) , it instead takes me to localhost/xampp

Can't find what else is needed to do.

3

There are 3 answers

1
viral On BEST ANSWER

Rename index.php in your htdocs folder to index1.php,

then try to access http://localhost,

so now you will see Apache's default Directory listing instead of XAMPP homepage.

If you somehow want to move back to the default XAMPP homepage, do rename index1.php to index.php

0
Tokke On

It's not really necessary to put your codeigniter project in the htdocs folder of xampp. You can also save it somewhere else. To run it, go to C:\xampp\apache\conf\httpd.conf and replace the line DocumentRoot "/home/user/www" to your liked one.

0
Jagira On

"index.php" kept in htdocs directory works as redirection.

  1. Open this file with notepad or in other editor.
  2. At this line:

    header('Location: '.$uri.'/xampp/');
    

    Replace xampp with the name of your website directory name ie root:

    header('Location: '.$uri.'/bulandshahr/');
    
  3. Your website will work.