dimaninc
dimaninc

Reputation: 850

mod_rewrite on the same server but different website

I have 2 websites on a server located in the following folders:

There is a folder 'test' on 2nd site with php-scripts inside:

So these scripts could be accessed via http this way:

I need these scripts to be also access via 1st domain, like this:

BUT without copying these files to site1's folder

is this possible using mod_rewrite?

Upvotes: 0

Views: 65

Answers (1)

user1269636
user1269636

Reputation:

Just make a symlink to your test folder.

ln -s /var/www/site1.com/test /var/www/site2.com/test

If you have the +FollowSymLinks option in your apache configuration for that vhost, I guess that should work.

Upvotes: 1

Related Questions