Solved

How to enable php virtual directory support?

Posted on 2009-03-28
1
5,700 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 500 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Split wordpress loop 35 56
How to change the nameserver on Ubuntu Server 6 49
Uploading a CSV Data Import via PHP & MySql 3 30
Correct syntax for subdirectories 9 18
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

856 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