Avatar of manicdiggity
manicdiggity
 asked on

Virtual Directory In Apache Htdocs Dir

Is there a way to have a virtual directory in Apache for a directory within the parent directory?  So for instance, if I have a virtual host that points to \htdocs\mysite, and I want to have /images point to \htdocs\mysite\version1\archive\graphics, how would I do this?

I'm having to balance converting an old system to a new one, so I can't simply move the \htdocs\mysite\version1\archive\graphics into the \htdocs\mysite\images folder

Thanks!
Apache Web Server

Avatar of undefined
Last Comment
manicdiggity

8/22/2022 - Mon
edchipman

We'll you could use mod_rewrite, it wouldn't be a virtual directory but it would give the illusion of it from the users perspective atleast.
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
RewriteBase /

RewriteRule ^mysite/images/(.*)$ mysite/version1/archive/graphics/$1 [L]

Open in new window

ASKER CERTIFIED SOLUTION
edchipman

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
manicdiggity

ASKER
That worked, thanks!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck