N.M. N.M. - 1 year ago 83
Apache Configuration Question

Trying to forward domain.com/abcd to some different local subfolder

In the apache server installation I have a .conf file which forwards all requests from www.domain.com to c:\www\domain. Now, i'm trying to forward www.domain.com/abcd to a different subfolder locally (say c:\www\abcd). i tried adding another .conf which looked like this.

<VirtualHost *:80>
ServerName www.domain.com/abcd
DocumentRoot "c:/www/abcd"

ErrorDocument 404 /404.php
ErrorLog "C:/logs/error.log"
CustomLog "d:/logs/access.log" common

<Directory "c:/www/abcd">
RewriteEngine on
AllowOverride All

<Location />
Order deny,allow
Deny from all
Allow from all

This doesn't work as intended. When i go to www.domain.com/abcd , I guess its trying to access c:\www\domain\abcd and showing not found error. Is there anyway to solve this issue without making DNS entries and without making changes to your local hosts file?

Answer Source

One possible solution would be to make a symbolic link

mklink /D C:\www\domain\abcd C:\www\abcd
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download