Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to enable php virtual directory support?

Posted on 2009-03-28
1
Medium Priority
?
6,351 Views
Last Modified: 2012-05-06
How do I enable php virtual directory support and what is its functions? I just can't find the settings in httpd.conf.

Can't find the answer on Google.  
0
Comment
Question by:space88
1 Comment
 
LVL 3

Accepted Solution

by:
Chakotay505 earned 1500 total points
ID: 24012645
Hm  think you mean virtual directories created with mod_rewrite.

mod_rewrite is a HTTPD module that enables you to create "virtual directories" and files, using a regular expression syntax, and map them to a specific file. It has to be enabled in Apache and you'll need
to enable the override type file_info (see http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride).
More information on mod_rewrite can be found at http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html.

Simple rewrite example:

File .htaccess:
RewriteEngine on
RewriteRule ^([A-Za-z]+)/([A-Za-z]+)\.html$ index.php?f=$1&p=$2

Redirects myFolder/myPage.html to index.php?f=myFolder&p=myPage
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy. ┬áThis article also serves as your NTP server documentation.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

782 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