• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

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?
0
jagguy
Asked:
jagguy
  • 6
  • 4
  • 2
1 Solution
 
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
 
COBOLdinosaurCommented:
Yeah okay that is just a installer for wampserver.

You just run the files using localhost:

http://localhost/yourfolder/yourfile.php

Cd&
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
BogeholmCommented:
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
 
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 6
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now