Page 1 of 1

Changing paths

PostPosted: 14. November 2009 22:44
by nick2price
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

Re: Changing paths

PostPosted: 14. November 2009 23:30
by Izzy
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.

Re: Changing paths

PostPosted: 14. November 2009 23:42
by nick2price
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

Re: Changing paths

PostPosted: 14. November 2009 23:46
by Izzy
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.