Xampp redirects to /xampp - codeigniter

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.

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

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.

"index.php" kept in htdocs directory works as redirection.
Open this file with notepad or in other editor.
At this line:
header('Location: '.$uri.'/xampp/');
Replace xampp with the name of your website directory name ie root:
header('Location: '.$uri.'/bulandshahr/');
Your website will work.

Related

www.localhost.com/magento and Index of /magento page shows up

I am trying to install Magento on localhost.
actually, I am a beginner of Magento and stackoverflow.
I have followed guide book and I downloaded Magento sample file.. and unzipped the file at c:/xampp/htdocs/magento
also modified the host file..
whenever I am trying to enter the
www.localhost.com/magento
index of magento page shows up.like ftp server.
How can I open the Magento file as well guide book..
I do not use xammp so I don't know how it's directory structure looks like, but: it looks like you are installing Magento in a subdirectory, right?
If you do so, you have to edit .htaccess. Change RedirectBase to the name of your subdirectory. So here it should be /magento/ And if the RedirectBase line in .htaccess is commented out delete the # at the beginning of that line.
Once magento zip file is unzipped drag the unzipped file in
c:xampp/htdocs/(magento unzipped folder) --->> this is root directory of magento
Now we web browser hit this url
http://localhost/(magento unzipped folder name)
if you are hitting this url first time it asks for configuration and admin url name
to access admin panel
http://localhost/(magento unzipped folder name)/admin url name
That seems to be related with your webserver configuration, and not Magento. If you have Apache, for instance, have a look at your configuration file httpd.conf, and check the line that starts with "DirectoryIndex".
You need to have "index.php" as a valid index file. If you don't, just add it right after DirectoryIndex, restart Apache and it should work fine.
/etc/httpd/conf -> usual location for the httpd.conf file (standard installation, RedHat/CentOS family)
Depending on configuration in the .htaccess file, you might need to specify index.php in the url as such: localhost/magento/index.php or (www.localhost.com/magento/index.php as per your comment) to access it.
Check your virtual host configuration file for the domain name that you are using. If the directory index is missing in the configuration then the apache server will not be able to determine the entry point for the website and will list all of the files.

Getting a 'Not Found' error on my website?

I'm trying to upload files to my domain that I'm hosting with Dreamhost. I connected to the server with FileZilla and I'm pretty sure I put the files in the right spot.
Their tutorial says to create a directory with your domain name like this: 'mydomain.com' and put your files in there. I put an index.html, p.css, register.php, login.php, and logout.php file in there. However, when I navigate to mydomain.com in Google Chrome, all I see is this:
Does anybody know what could be causing this?
BTW I didn't actually create a directory called "mydomain.com" I used the domain I own.
UPDATE:
The directories are set up like this:
/
mydomain.com
public_html
register.php
main.css
logout.php
login.php
index.html
Can you make sure you have group read permissions on the file you are attempting to fetch?
You want permission each file has a 755 permission, here is how you would change a file permission in FileZilla.
Also, make sure everything is in the public_html file.
public_html/index.html
public_html/p.css
public_html/register.php
public_html/login.php
public_html/logout.php
Try adding a file named .htaccess to your public_html directory. In this file, put the following line:
DirectoryIndex index.html
Assuming the webserver is Apache (or a work-alike) this tells the server to send index.html whenever someone asks for /.
I finally figured it out. For some reason it wasn't working when the directory was labeled mydomain.com. I changed it to mydomain_com and it fixed it for whatever reason. Thank you to cevaris and Amazed for helping me.

'Unable to open WampServer's config file, please change path in index.php file' not opening localhost in browser

Recently I've been using WAMP server for my project. But due to some reason I need to switch to XAAMP server, so I uninstalled WAMP server and installed XAAMP server.
But when I open localhost in my browser it says:
Unable to open WampServer's config file, please change path in index.php file
What might be the problem?
I had the same problem - check your www folder - delete index.php
Edit: The index.php is an unnecessary default home page for Wamp server which will cause the error when running from an XAAMP htdocs folder. In other words, your localhost is working, you've just got an index.php file from the old WAMP install.
you can edit your index.php and if you move it from one place to another, just change it like this:
$wampConfFile = 'c:/wamp/wampmanager.conf';
$aliasDir = 'c:/wamp/alias/';
$vhostsDir = 'c:/wamp/vhosts/';
I got this same error today. I realized I had uploaded my main's localhost index.php instead of the one in my webpage's folder.
So just make sure you're pointing at your correct localhost folder before uploading the index.php. Problem solved!

XAMPP is displaying parent directory

I installed XAMPP on my Windows 2008 server and created a new folder in the HTDOCS folder and the user can access the pages using the link.
For example:
http://1.1.20.305/MyDB/index.php
Will take the user to the index.php page.
But if I enter the following in my browser:
http://1.1.20.305/MyDB/
It displays the parent directory with all the files.
It is a security risk and how do I prevent it from happening? It should auto-route user to the index page or somewhere I define.
I added the .htaccess and .htpasswd file in the directory and the directory is not shown anymore.

Where do I put my php files to have Xampp parse them?

I finished installing Ubuntu 10 for netbooks, and XAMPP. The XAMPP website tutorial made it very easy to install, then left me high and dry. Everything works, but I have no idea where to put my handwritten php files.
After a few hours of googling, and trying to understand the file explorer, I realized I have no idea where anything is in ubuntu. For an answer, please don't just tell me "go to "X" directory. I won't know how to navigate there.
I also did a file search for htdocs with no luck.
in XAMPP the default root is "htdocs" inside the XAMPP folder, if you followed the instructions on the xampp homepage it would be "/opt/lampp/htdocs"
I created my project folder 'phpproj' in
...\xampp\htdocs
ex:...\xampp\htdocs\phpproj
and it worked for me. I am using Win 7 & and using xampp-win32-1.8.1
I added a php file with the following code
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
was able to access the file using the following URL
http://localhost/phpproj/copy.php
Make sure you restart your Apache server using the control panel before accessing it using the above URL
When in a window, go to GO ---> ENTER LOCATION...
And then copy paste this: /opt/lampp/htdocs
Now you are at the htdocs folder.
Then you can add your files there, or in a new folder inside this one (for example "myproyects" folder and inside it your files... and then from a navigator you access it by writting:
localhost/myproyects/nameofthefile.php
What I did to find it easily everytime, was right click on "myproyects" folder and "Make link..."... then I moved this link I created to the Desktop and then I didn't have to go anymore to the htdocs, but just enter the folder I created in my Desktop.
Hope it helps!!
Look into the httpd.conf and/or httpd-vhosts.conf files and search for the DocumentRoot entry. If you configure multiple virtual hosts, there may be more than one of those, separated in <VirtualHost> tags.
This will work for me:
.../xampp/htdocs/php/test.phtml
The default location to put all the web projects in ubuntu with LAMPP is :
/var/www/
You may make symbolic link to public_html directory from this directory.Refered. Hope this is helpful.

Resources