Matthew
Matthew

Reputation: 604

htaccess allow access to directory outside public

I need to create a rewrite rule to allow users to access a directory outside the public directory.

so I have for example

app/ skins/ documents/ public/ /index.php

I want my users to be able to access the documents folder while keeping public as my web root.

Is htaccess the best way to do this? if so, then how?

Upvotes: 1

Views: 804

Answers (2)

Matthew
Matthew

Reputation: 604

In the end I just used a symbolic link to grant access the a none public directory via the URL. Using as Alias as GolexTrol suggested would also work but this is the method I used.

Upvotes: 0

GolezTrol
GolezTrol

Reputation: 116100

Using mod_alias you can create an Alias.

Alias /docs/ /your/path/to/documents

This allows you to browse to www.example.com/docs and get the content from the documents directory.

mod_alias reference

Upvotes: 2

Related Questions