Avatar of dev09
dev09

asked on 

Mirror directory

Hi all,

I'm wondering if mirroring a directory is possible. E.g.  abc.com/test-123/ = abc.com/test/

So it would not redirect, but would look at the same files on the other directory. The reason is for a custom web app - to have a 2nd version for testing.   Each directory would look at different databases but both share the same files (php, css, images, etc)

I can do a detect URI in php to choose which database to look at. It's having the ability to mirror the same web files is the question.

I've had a play with htaccess files
Alias /test-123/ /test/

Open in new window


But get a misconfiguration when trying to view in a web browser.
I know parking a 2nd domain can effectively look at another domains root folder - but we're not wanting this as we're dealing with directories on the same domain.

I hope someone has a solution or can point me in the right direction.
Thanks
Apache Web ServerWeb ServersScripting LanguagesPHPWeb Development

Avatar of undefined
Last Comment
dev09

8/22/2022 - Mon