?
Solved

php redirect

Posted on 2013-06-08
12
Medium Priority
?
228 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

 

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
 
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 2000 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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

752 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