Solved

php redirect

Posted on 2013-06-08
12
218 Views
Last Modified: 2013-06-12
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
Comment
Question by:jagguy
  • 6
  • 4
  • 2
12 Comments
 
LVL 3

Expert Comment

by:Bogeholm
ID: 39232669
Hi Jagguy

Are you running a Local webserver? If yes, is it IIS on Windows?
0
 

Author Comment

by:jagguy
ID: 39232908
Hi,
I am running apache (easyPHP)
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39233043
Yeah okay that is just a installer for wampserver.

You just run the files using localhost:

http://localhost/yourfolder/yourfile.php

Cd&
0
 

Author Comment

by:jagguy
ID: 39234196
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
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39235422
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
 

Author Comment

by:jagguy
ID: 39236420
yes where do i do this again?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39236452
for windows 7 the host file is generally at:

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

Cd&
0
 

Author Comment

by:jagguy
ID: 39236641
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
 

Author Comment

by:jagguy
ID: 39237626
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
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39238285
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
 
LVL 3

Accepted Solution

by:
Bogeholm earned 500 total points
ID: 39239200
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
 

Author Comment

by:jagguy
ID: 39239654
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now