php redirect

I am using DW and I have php installed and this works (easy php)
I need to run php files but how do i set the current folders I am working to work with php?
jagguyAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
BogeholmConnect With a Mentor Commented:
Hi,
To change the default 'site folder' in Apache, you need to right click on the icon on the Easyphp icon on the taskbar and select configuration->Apache. This will open httpd.conf in a notepad window

Find DocumentRoot and the section: DocumentRootDirectory and modify the path to your preferred path, Where you find the default path.

Pay attention to Where to use '/' and '\'
0
 
BogeholmCommented:
Hi Jagguy

Are you running a Local webserver? If yes, is it IIS on Windows?
0
 
jagguyAuthor Commented:
Hi,
I am running apache (easyPHP)
0
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
COBOLdinosaurCommented:
Yeah okay that is just a installer for wampserver.

You just run the files using localhost:

http://localhost/yourfolder/yourfile.php

Cd&
0
 
jagguyAuthor Commented:
ok but localhost points to a directory I dont want to place my php files.
I need to redirect my php dir so the files can be picked up
0
 
COBOLdinosaurCommented:
Either change the wampserver config to point where you want it to point; change the location of your files, or change all the hrefs to use a path that traverses from wampsers default to your folders.

Cd&
0
 
jagguyAuthor Commented:
yes where do i do this again?
0
 
COBOLdinosaurCommented:
for windows 7 the host file is generally at:

c:\windows\system32\drivers\etc\host

Cd&
0
 
jagguyAuthor Commented:
My files for php are located in e:/program files/easyPHP/www

I want the dir of this moved so I can run php files from another dir. In Php.ini or httpd.conf how do i do this again exactly?

I want to run php files in e:/website/<another folder>
0
 
jagguyAuthor Commented:
I really dont know what to do here and what setting to change so I can run php files from a dir of my choice
0
 
COBOLdinosaurCommented:
The files have to be under the root.  The wampserver directory is the root.  The server cannot access or see what is not below it in the hierarchy.

You cannot do localhost/e:/website...

It must be localhost/website... and the website foler must be inside the folder where the serve is.

Cd&
0
 
jagguyAuthor Commented:
This is what i did to make it work but the VirtualHost

DocumentRoot "D:/code"
(...)
# DocumentRootDirectory
<Directory "D:\code">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
 </Directory>
 (...)
 NameVirtualHost 127.0.0.1
 <VirtualHost 127.0.0.1>
   DocumentRoot "D:/code/"
   ServerName localhost
 </VirtualHost>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.