Changing paths

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Changing paths

Postby nick2price » 14. November 2009 22:44

Hi. So I have everything installed and working fine. I am using xampp for my php processing. Now, I know that all the php files placed in C:\xampplite\htdocs work fine. But what I want is to place all of my work, html and php files, into a folder on my desktop. But in doing this, the php files dont work. What do I need to do in order to get it to point at this folder for my php files, rather than the default folder?

cheers
nick2price
 
Posts: 3
Joined: 13. November 2009 22:32

Re: Changing paths

Postby Izzy » 14. November 2009 23:30

You can create an Alias directive in the apache\conf\extra\httpd-xampp.conf file to do what you want.

You can add it after the Webalizer entry and before the </IfModule> line.

Use the other Alias entries as an example for your own entry.

For example but add your own folder name and path details - backup the original conf before editing:
Code: Select all
Alias /myfolder "C:/path/to/your/desktop/folder/"
<Directory "C:/path/to/your/desktop/folder">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Save the file after editing and then restart Apache.

http://localhost/myfolder
should find the index.php or index.html file in that myfolder on your desktop or what ever you have decided to name the myfolder - no index file will do a listing of all files and folders.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Changing paths

Postby nick2price » 14. November 2009 23:42

kool, just out of interest, if I didnt change that, I would have to place everything in the htdocs folder? And for my website, my first page is called index.html. Am I suppose to override the index.html in the htdocs folder with my version of it?

cheers
nick2price
 
Posts: 3
Joined: 13. November 2009 22:32

Re: Changing paths

Postby Izzy » 14. November 2009 23:46

If placing your own files in the htdocs folder then you need to delete both the index.php and the index.html files.

Then if you want to go to the XAMPP Welcome Demo Page you would type this address in ypour browser:
http://localhost/xampp/

For your own files access you would simply now type in your browser:
http://localhost/
for the index.html file etc.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 63 guests