user796443
user796443

Reputation:

how to mirror directory with htaccess?

is it possible to mirror directory with htaccess?

For example:

/folder1 <= is empty
/folder2/blah/blah <= here is content

I want folder1 to display folder2 contents. So that when you go to folder1/ you can navigate to folder1/blah/blah/files

is this possible?

Upvotes: 1

Views: 518

Answers (1)

Pekka
Pekka

Reputation: 449525

Alias can do this, although folder1 shouldn't exist for it to work:

Alias /folder1 /folder2/blah/blah
  • In .htaccess files, you can only Alias to a directory inside the web root.

  • It doesn't always work in .htaccess files, depending on the server configuration.

  • In the central configuration, you may have to use an absolute path as the Alias target.

Upvotes: 1

Related Questions